#teriyaki
1 messages · Page 1 of 1 (latest)
Hi there 👋 have you completed a payment for the Customer whose ID you're providing when creating a new Checkout Session? Can you share the Customer ID that you're using for testing?
Hi @hybrid jackal ! The customer already has a subscription in my app (and in Stripe), so he has default payment method and other details.
customer ID = cus_Mm4Sl8HD57qmKe
👋 stepping in as toby needs to step away
Taking a look
So the key for this is:
A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.
Doesn't look like those things are true for that PaymentMethod
Hi @tired anvil !
I just updated billing details of the customer , I attached the screenshot from Stripe Dashboard.
But still, the card is not pre-filled.
Do you happen to know what else fields should I update?
Those details are the Customer's details, not the PaymentMethod's details.
The easiest way to test this is to actually just go through a Checkout flow and fill out all the necessary details for that new PaymentMethod/Customer
Then revisit a new Checkout Session using that Customer
Thanks, I'll try!
👍
Hey @tired anvil !
I followed the flow, but only the customer's name became pre-filled
Payment Method look like this
What am I missing? 😫
Hmmm so there is no email on that PaymentMethod. I thought we carried down the email if you went through the Checkout Session
Can you give me that PaymentMethod iD?
Sure, it is pm_1M2WJlI26eHXRQ5AdGPBIbDP
So wait that PaymentMethod was still created outside of Checkout, no?
Looks like that was created using Card Element?
Yes, it was created during the initial subscription this customer has
Card Element, exactly
Right so Card Element doesn't collect email by default. You would need to set the PaymentMethod's email via the billing_details when you create the PaymentMethod: https://stripe.com/docs/js/payment_methods/create_payment_method#stripe_create_payment_method-paymentMethodData-billing_details
Or otherwise you would update the PaymentMethod's email server-side
It won't show up in Checkout unless it has a billing email associated (which your example above does not)
Thank you so much, @tired anvil ! I'll try that! Have a nice day!