#rockii
1 messages · Page 1 of 1 (latest)
Can you share the checkout session creation request id?
Yes, one sec
Interesting that they want 1 hosted flow and 1 non-hosted flow
cs_test_b1SEpK4LF3oOdb1VYMFQgTmoZqV4ozwb2fsLuJZFDBuAUsxdSodUXxSfmR
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
. 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.
Make sure the payment method has valid billing address, name, and email all populated
Are we able to pre-fill just the name and card and then have the use provide the missing information?
Or do we need to capture all the information to be able to prefill?
It's strange because when using the checkout session, we weren't capturing the billing address either but we were able to prefill the data without any issues
Hi there 👋 taking over, as my colleague needs to step away
As far as I know, that data must be present on the Payment Method for it to be prefilled.
How come that wasn't the case when using the checkout session?
Do you have an example I can look at where the information was prefilled, but the Payment Method didn't have the necessary billing details?
Yes one sec
This is the registration flow where we capture the payment method -- note that there's no address.
You can now click on this link
https://dashboard.joinmondaygirl.com/applications/8c492a11-880d-487f-a1dc-6834f781f964
And complete the flow (subscription flow)
You need to look at the Payment Method object. I don't think it matters if the billing details show up or not when it comes to prefilling info
If you uncollapse the Payment Method on the Customer object, you can see all the info that's needed is there: https://dashboard.stripe.com/test/customers/cus_PMc2Rw3o7V2NUG
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Note: a full address isn't needed. Just a zipcode and country
But were are capturing country and zip in the first flow
We also tried @upbeat palm 's suggestion of manually filling in the billing info with an address and we still get the same issue
I'm confused. Prefilling the information in a Stripe Checkout Session seems to be working as expected, yes?
No it's not auto filling out the card info on the second flow
but it fills the country data
Users go through to flows on our app
- Application: This is where they apply to be members. Here's we capture payment info (see first screenshot above)
Right, understood.
- Registration: Once they're approved, they are sent a unique link where they complete registration flow and subscribe
The other flow, you're trying to prefill information as well?
the second flow isn't carrying over the info that we captured for the first flow
even though that data is being properly captured in stripe
Okay, so this is the non-Checkout flow:
- customer lands on page with a form for adding their address,
- once complete, the customer is redirected to the page where they input their payment credentials
Is that correct?
The screenshot here is built with Elements an it's part of the first flow (application flow) where the user first interacts with the app.
- Customer lands on the page and we capture the info below
- The user is then sent a confirmation link via email that they click on and that takes them to the second second flow (checkout session where we create a subscription). On this flow, the country info is prefilled, but the payment details are not. see below:
So the email, name and country are prefilled, but not the credit card
Ahhhh, okay I see what you're saying. Can you send me the Checkout Session ID for the Checkout Session you generated? Specifically the one from your most recent screenshot
checkout.session — cs_test_b15aiK33zuVuxP3oBezaS7P26eIA0591CtHpBSMR60Wq3OinPULxI1OPEb
We also just did a test...
We got to that last screen in the second flow, and filled it out with a different card. We then deleted the subscription that we just created, and tried goign through the second flow again, and this time, it was auto filled
This is a screenshot of the two cards after we added a second card
We then deleted the active subscription as well as the first card that we'd added in the first flow (application flow) so that we could test the second flow (subscription flow) again
And it worked.. this is what we land on
I wonder if you're creating the Checkout Session before the Payment Method is actually attached to the Customer. Like, in your flow, do you immediately redirect to Checkout after the user clicks submit to submit their payment method details?
We're attaching the payment method on the application flow(1st flow) and then use it on the subscription flow (2nd flow).
Sorry, I'm not sure what 1st flow and 2nd flow specifically refer to. What I want to know is how much time passes between when you attach the Payment Method to the Customer, and when they get redirected to the Checkout Session URL.
It can easily be days
it's not instant
This is called during the application flow, we use the client_secret present on setupIntent to access the Elements form on the FE
This is how the Elements form submits the cc info
And this generates the checkout session for the subscription. We use the external_url present on session
First Flow refers to the Application flow - Our users apply to be members and fill out an application that we review (review can take days or even weeks)
Second Flow refers to the registration flow - Once a applicant is approved, an email is sent to them where they can complete their registration
Okay, sorry, let me rephrase. How much time passes between when the Checkout Session is created and when the Customer has their Payment Method attached?
The user and setup intent are created at the checkout flow, first screenshot shows it.
Checkout session is created at the registration flow (last screenshot).
Days or weeks could pass between the two. (sorry not sure if I'm properly answering oyur question)
Hi, I'm jumping in as two-shows has to step away. let me catch up here
To summarize the flow. You're collecting the payment details using SetupIntent. You then, create a Checkout Session using passing in the customer id to prefill the payment details. However, you're not seeing these details populated? Is that correct?
If so, please note that the customer has to have billing details below:
A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.
Looking at this Checkout Session creation, https://dashboard.stripe.com/test/logs/req_oWADAUKCy0tuKP it does not look like the customer, cus_PMc2Rw3o7V2NUG passed has these details.
Are you referring to the fact that you collected the billing address during the SetupIntent?
If so, looking at this PaymentMethod, https://dashboard.stripe.com/test/logs/req_aFRulj9G0hEo9J is does not look like the full billing details were provided. You would need to have billing_details.name and billing_details.email populated