#Peter Silie
1 messages · Page 1 of 1 (latest)
I assume you're creating Checkout Sessions?
If so, then yes as of 2022-08-01 a Payment Intent is no longer generated on creation of the session, but instead when we attempt payment/confirmation (on the payment page):
A PaymentIntent is no longer created during Checkout Session creation in payment mode. Instead, a PaymentIntent will be created when the Session is confirmed.
https://stripe.com/docs/upgrades#2022-08-01
Ok, when I create a session, on what parameter can I trust to identify the payment?
Nothing at that point really as there's no payment. I guess you could use the ID of the session (cs_xxx)
But you should instead handle this payment reconciliation once the session is completed via webhooks: https://stripe.com/docs/payments/checkout/fulfill-orders
Well the Session ID is always the same as long as the user does not leave the browser.
True, but doesn't always mean there was a payment attempted/made
Sure.
Plus, you can't look up all payment details directly via the cs_xxx ID
You'd still need the Payment Intent ID to get specific payment details
Yes of course. But how can I connect the webhook results to my records in the database?
It the Moment I create that session I store the Order in my database. Fine so far.
The webhook returns different things but how do can I process the correct Order in my table?
The link I sent should cover that. You'd create a webhook handler that connects with your API/database the same way you do on session creation
It returns a Checkout Session object, the same as the API call to create the session. Except this time you know its completed/payment has been made
You mean the "Fullfill orders..."?
Ok, I'll take a look. Hopefully that works... 😉
Thanks so far.
let me know if you have any Qs!