#r0ckii-checkout-customer
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rockii, 3 days ago, 63 messages
Hi there
We can't re-open threads, but if you summarize your issue here then I'd be happy to help.
Could you review that thread so you have context on the issue?
No sorry. We help multiple folks in real-time here. I can't read through a long thread.
In short, we have a website were users have two onboarding flows:
- THe first flow (Application Flow) users are applying to be members of our community. They fill out a form and at the end of the form, we are using elements to capture their payment information and a user is successfully created in our Stripe Dashboard. This is is how the Elements form submits the captured payment info (see image) and this (see second image) is how it generates the checkout session for the subscription -- we use the 'external_url' present on 'session'. The review process can take days or weeks, but once approved, they are sent an email with a link that takes them through the second Flow
Okay
Are you having an issue here where another PaymentMethod is collected from the Checkout Session?
My mistake we use the 'client_secret' prensent on 'setupIntent' to access the elements form on the FE
This is how the Elements form submits the cc info
Okay, what's the actual problem?
And this generates the checkout session for the subscription. We use the external_url present on session
- The second flow (Registration Flow) is when an applicant has been approved and can formally register. During this flow we use a hosted payment form. But when the user gets to this page, their CC info is missing and is not being auto-filled
It fills their email, name and country but not their credit card. This is the issue we're having
Correct
That's because it will only pre-fill that card if certain conditions are true which we outline here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
In subscription mode, the customer’s default payment method will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.
We meet all the conditions
Can you provide a Checkout Session ID that I can look at where the card wasn't pre-filled in that case?
Thanks looking
Okay so that Checkout Session creation request (https://dashboard.stripe.com/test/logs/req_9p84DLet8Jhj8E) passes in cus_PMc2Rw3o7V2NUG which has no default PaymentMethod set at all.
So before you create the Checkout Session you need to update the invoice_settings.default_payment_method on the Customer: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
will look into this with our dev and follow up -- thanks
Sounds good!