#Peter Silie

1 messages · Page 1 of 1 (latest)

night waveBOT
sly fjord
#

I assume you're creating Checkout Sessions?

serene wedge
#

Yes, thas correct.

#

$session = $stripe->checkout->sessions->create([

sly fjord
#

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

Keep track of changes and upgrades to the Stripe API.

serene wedge
#

Ok, when I create a session, on what parameter can I trust to identify the payment?

sly fjord
#

Nothing at that point really as there's no payment. I guess you could use the ID of the session (cs_xxx)

serene wedge
#

Well the Session ID is always the same as long as the user does not leave the browser.

sly fjord
#

True, but doesn't always mean there was a payment attempted/made

serene wedge
#

Sure.

sly fjord
#

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

serene wedge
#

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?

sly fjord
sly fjord
serene wedge
#

You mean the "Fullfill orders..."?

#

Ok, I'll take a look. Hopefully that works... 😉

#

Thanks so far.

sly fjord
#

let me know if you have any Qs!