Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any stripe element to display a saved card to user.?

Hi I'm using stripe in my react project. I need to display the cards saved by user. Is there any stripe components to display the saved card details to the user.?

TIA

like image 951
heisenberg Avatar asked Jan 01 '23 09:01

heisenberg


2 Answers

There is no Stripe Element to display saved cards, you'd have to build this yourself.

You'd retrieve the customer's list of PaymentMethods on your backend (https://stripe.com/docs/api/payment_methods/list) and then show the list in your UI.

like image 74
Paul Asjes Avatar answered Jan 31 '23 05:01

Paul Asjes


One thing you can do is to create a customer portal through Stripe Billing. Inside that portal, the user can see the card they added, manage them, update them, and delete them. The customer portal is a hosted page made by Stripe: https://stripe.com/docs/billing/subscriptions/integrating-customer-portal.

The portal will looks like this: https://billing.stripe.com/session/_IOHbe75ZzSJ9eF4mMwaBlTGyateZ1kF

Notice that you don't need to use the billing subscription part. You can only use the payment management of the portal.

like image 33
gshow8 shac Avatar answered Jan 31 '23 06:01

gshow8 shac