Reputation: 55
I am currently integrating the Stripe payment gateway into my website. Meanwhile, I'm saving my customer and payment method id upon successful payment into the database for future use or for displaying the saved card on my website.
what can I do on my client side to get back the saved card using customerId and PaymentMethodID?
Upvotes: 3
Views: 1713
Reputation: 1354
Stripe doesn't have built in functionality to do this so a typical pattern is to list the customer's payment methods[1] with a server side call and pass that info to the client side to be rendered with your own custom code.
[1] https://stripe.com/docs/api/payment_methods/customer_list
Upvotes: 2