#muzzamil
1 messages · Page 1 of 1 (latest)
hi! what part isn't working exactly?
that code you posted looks like it will create a PaymentIntent that, when you accept a payment with it, will save the payment method used to the Customer ID you are using; so that seem good.
first time payment is working fine but if i want to use the saved card person it will not work for them
suppose if i checkout for the first time what i need is to save my card details so if i come next time then it should have my card details that part is missing
which part doesn't work exactly?
if you create the PaymentSheet using an ephemeral key for the same Customer ID, it will show them their saved cards.
I did create the PaymentSheet but it not showing the saved card details
are you using the same Customer ID that you previously saved cards to?
you need to authenticate the user
so for example the customer logs into some account in your app before getting to the payment pages. In your databases where you manage user accounts, you store the cus_xxx ID. When the app sends a request to the backend, you look up the authenticated user and select the cus_xxxx for them
for now i'm not using the Authentication is there any other way to do it
without authentication
actually i've guest section the users are not authenticated so how do i create saving card features for them
well you wouldn't, if they're guests then you wouldn't save the card