#sfd

1 messages ยท Page 1 of 1 (latest)

noble sundialBOT
strong steeple
#

๐Ÿ‘‹ happy to help

inner dome
#

hi

strong steeple
#

would you mind elaborating a bit more

#

and describing the current behavior, and what's expected?

inner dome
#

yeah, when buying a product from our website before redirecting to the stripe form to pay we create the session and save the Pi_ id

#

then i expect the webhook to return when successfully payed it to change order status to completed

#

recently started to fail sometimes, because the webhook returns a different pi

strong steeple
#

you shouldn't rely on the PI ID

#

instead you can save the Checkout Session ID

#

and listen to the checkout.session.completed event

inner dome
#

ch_xxxx like?

strong steeple
#

no cs_xxx

#

the ch_xxx is the Charge ID

inner dome
#

ok, so this is why we get a different pi, with the right metadata. (i'm sending via metadata our order id.) you suggest using the checkout session anyway?

strong steeple
#

yes

inner dome
#

if ($event->type === 'payment_intent.succeeded') {
ok right now i have this, i will make the modifications to save and check the session.
Thank you for the help

strong steeple
#

sure let me know if you need any more help

inner dome
#

i will! thank you

inner dome
#

hi, is there a way to have all the webhooks events in the last 3 months for example? i need to check all the payments to be sure i didn't miss any

strong steeple
inner dome
#

Thank you very much!