#letscheckthis_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1308363826332434443
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
cs_live_b13xMwxISq900mqOqdTuwPb1mbJDydfkgM7U0WyPj6w415RUTLLdmYIfPk
do you need the 2 customer ids?
that Checkout Session was for cus_RF4We22y2CNeES. what's the issue?
the issue is that we already had another customer in stripe for that user - cus_RDf1Lvhq2fMyqT
You can see the emails are the same.
We created cus_RDf1Lvhq2fMyqT from our BE and we created a session for it
but for some reason the checkout didn't reuse this customer and instead created a new one
see this request req_iIHAsYHDWrgIVz where we create the session with the existing customer id
but for some reason the checkout didn't reuse this customer
well, for the pricing table to reuse an existing customer, you need to use a Customer Session: https://docs.stripe.com/payments/checkout/pricing-table#customer-session
otherwise it will just create a bran new customer every time.
yes, we do that
we created the session with this request req_iIHAsYHDWrgIVz
this has been working fine for other clients
I'm confused. if you are using the Pricing Table, then why are you creating the Checkout Session yourself?
so that when the user clicks on the subscription in the pricing table and gets redirected to stripe, stripe would show the payment methods configured for this user
this is the request we send to create the session:
{
"components": {
"pricing_table": {
"enabled": "True"
}
},
"customer": "cus_RDf1Lvhq2fMyqT"
}
maybe i confused you because this is not a "Checkout" session, but Customer session
sorry for that
we followed the stripe documentation, which says we can pass customer session id in the pricing table
maybe i confused you because this is not a "Checkout" session, but Customer session
oh yes, sorry
having a look
to be clear, https://docs.stripe.com/payments/checkout/pricing-table#customer-session is what you're doing?
if so maybe you have a bug and you pass a variable to customer-session-client-secret that is null, that would explain this
let me check this.
Thank you very very much!
one more question. Is it possible to be a timeout issue?
Here https://docs.stripe.com/no-code/pricing-table#customer-session I read:
"
You have 30 minutes to include the client secret in the pricing table. After rendering the pricing table, you have an additional 30 minutes to complete a payment before the customer session expires.
If you create a Checkout Session with an expired customer session, we discard the client secret and create the Checkout Session with no associated customer.
If the customer session expires after Checkout Session creation, but before confirmation, payment confirmation fails.
"
So, if the customer opened our UI where we render the pricing table and waited for 30+ minutes and THEN clicked on the subscription plan, would that explain what happened?