#sfd6088
1 messages · Page 1 of 1 (latest)
Can you share some IDs that explain your situation?
cs_live_a1lgAOxo..
this is the dead session
cs_live_a1...
this is the live session, that completed the payment
in the metadata you can see the order id i use to check orders
the ecommerce is custom made in laravel
There is no metadata set on either of those sessions. It's set on the associated Payment Intent
i'm sorry, yeah, it's set in the pi
Ok, then what is the issue?
the problem is that the flow seems broken, user started the payment, I create the session and the payment intent, then redirect to the payment page, and after the payment I expect the webhook to confirm the order. In this case, the webhook confirmed a cs different from the one i created
The flow is broken how? Your integration generated a new Checkout Session which your customer subsequently completed
it would have a different order id, that's what i don't get, is it possible for the customer to create a new session refreshing the page? everytime a customer click pay before redirecting him to the stripe page i create a new order
using the cs_live_ to check is correct?
No, refreshing the hosted payment page won't generated a new order. My assumption is they went back to your store and clicked 'buy' again which likely generated a new session
What do you mean?
i mean is correct to use the cs_live id to check if the order is payed? i used payment intent but i saw that sometimes it was changing and found the the cs was better.
that's the problem, if he went back, and clicked buy again the order id would be different
Then that's an issue you need to resolve in your integration
Based on this predicament I'd say no as the cs_xxx could change
you mean that the session can change during the payment?
It will change if your integration creates a new session yes
if a customer click buy i create a new order and then a new stripe session using order id in the metadata