Stripe iOS SDK's prebuilt UI and card saving

I want to use Stripe prebuilt UI https://stripe.com/docs/mobile/ios/basic

But if you use it, when entered the card, it will save to Stripe , so when we reopen prebuilt UI we will see previous card.

Is here any solution to use this prebuilt UI, but have option not to save card, but ask user about it (like checkbox "I want to save card"), so if user does not want to save card, next time user will enter card info again

And also, Did i understand right, that prebuilt UI will display only cards and apple pay, even if we connected other payment methods ?

1 answer

  • answered 2020-11-20 17:33 hmunoz

    Is here any solution to use this prebuilt UI, but have option not to save card, but ask user about it (like checkbox "I want to save card")

    By default this isn't supported in the iOS SDK. You could use a addCardViewControllerFooterView to add a UISwitch and implement STPBackendAPIAdapter yourself to handle custom functionality for how you want cards saved.

    Did i understand right, that prebuilt UI will display only cards and apple pay, even if we connected other payment methods ?

    Correct, the pre-built UI primarily works with cards.