#james-checkout-savecards
1 messages · Page 1 of 1 (latest)
Hello! Yes, you can do that in some circumstances. See here for details: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#save-payment-method-details
Can you give me the Customer ID you're using?
i am passing in the customer who has a saved payment method but when i go to checkout only the email is prefilled and the payment method is empty
sure
'cus_OV21H1nPiyHD56'
That Customer does not have any attached Payment Methods.
oh but i do have a default payment method which i can see on my dashboard
let me confirm that. thank you.
I think you might be looking at a different Customer perhaps?
i just tried again with a different customer who definitely has a payment method
cus_OV0WiC0yQ7hTzv
this time it prefilled the location and post code
but not the payment information
payment information for this customer is pm_1Ni0W7LXvJT74HZxLvwZv99S
still doesnt prefill the payment information on checkout
Yep, that one does have the Payment Method you mentioned. Looks like this Payment Method wasn't set up for future use with Checkout though, which is probably why it's not showing up in Checkout as an option now.
You need to pass https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage if you want Checkout to save card details for future payments
james-checkout-savecards
thank you!
oh! does this mean that the prefilled payment method can only work if the payment information was collected with a stripe checkout? we are using create payment intent and setup intent everywhere else in our code. and that is how we create the payment method.. i should be able to pass in the setup future usage there and should work fine? i will give it a try
as long as the card PaymentMethod meets the require,emt in the doc linked earlier it will work
I just gave you the parameter for Checkout, but if you use PaymentIntent or SetupIntent it's the same thing: make sure the card PaymentMethod is properly attached to the Customer
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer the docs here also touch upon some of the requirements like a full billing address
thank you so much. you have been incredibly helpful. i have one last question. for the success_url, if we do not want to customize and just want a stripe page that says sucess payment complete. is this possible?
you would build your own success page for this