简体   繁体   English

在iOS上条带化并保存卡详细信息

[英]Stripe on iOS and saving card details

I need to implement "Save card" and "Delete card" features in my iOS app. 我需要在我的iOS应用中实现“保存卡”和“删除卡”功能。 From Stripe documentations I found that we can create a customerId on our backend and link it to our internal userId. 从Stripe文档中,我发现我们可以在后端创建一个customerId并将其链接到我们的内部userId。

But we need part of card details to display it to user. 但是我们需要部分卡的详细信息才能显示给用户。 Eg 例如

Visa card xxxx xxxx xxxx 8153

  1. Is it ok to store this data on backend and iOS app? 可以将这些数据存储在后端和iOS应用上吗? I'm talking about card type and last 4 digits. 我说的是卡类型和后4位数字。
  2. Should we create new customerId in Stripe if we want to store more than one card per customer? 如果我们要为每个客户存储多个卡,是否应该在Stripe中创建新的customerId?

Thanks. 谢谢。

  1. There are certain details that are available when you store a card; 存储卡时,有些细节可用。 you don't need to store them separately. 您不需要将它们分开存储。 "Last 4" and type are some of the fields available from the API; API中提供了“最后4个”和类型。 check out the Stripe docs for cards for more. 请查看Stripe文档获取更多信息。 https://stripe.com/docs/api#cards https://stripe.com/docs/api#cards

  2. No, you don't need to create a new customer (and in fact, would probably be a bad thing for keeping everything cleanly coordinated). 不,您不需要创建新客户(实际上,对所有内容进行协调统一可能是一件坏事)。 Store additional cards on the same customer. 将其他卡存储在同一位客户上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM