2
votes

I am using Stripe in android application. Currently, client-server are used to create customer and charge on card.

Now I want to save the card information returned by stripe in app and display list of added cards in payment methods in custom ui for updating, deleting and selecting default card.

I have gone through the Ephemeral-Key documentation of stripe and they have provided activities to display the card details. But I couldn't find how to show card list in custom ui.

Is there any other way to achieve this like saving card info locally?
Does stripe allow custom ui for list of cards etc?

Thank You

2

2 Answers

1
votes

As of 6.1.2, there is no stripe provided component available to display multiple card. You will need to display single Card widget multiple times one below the other. Stripe allows you to have your custom UI for that. You will have to ask your backend to provide you with Card details info.

While sending back the Card information, you will beed to call stripe API with card details to get card token associated with that card. (You should not send card details as is to the backend.)

Hope that helps.

2
votes

So you can use the retrieveCurrentCustomer()-method on the CustomerSession to get the Customer and all of it's associated sources. They'll be available in the sources-attribute and you can get at them with the getSources()-method on the Customer model that is returned. You should be able to leverage that to display your Customer's sources in a custom user interface.

Hope that makes sense.

Cheers!