#birdy247
1 messages ยท Page 1 of 1 (latest)
Hi ๐
What's your question?
We have seen a couple of cases where our clients are paying a different payment_intent to the one in our DB
it seems the one they are confirming was made 4 minutes before the one we have in our DB
The one they paid (of which we do not have the ID in our DB)
Just the IDs are all I need. I can't use the Dashboard links
The one we have in our DB: pi_3MIWmNCt3m4r28lr0dxrSjyV (most recent)
The one they confirmed: pi_3MIWiKCt3m4r28lr0Tpknnrk
Everytime our checkout page loads, we make a new payment intent
So the only way I can see this happening is if they open a browser window, then open another browser window and pay the 1st window
Okay so it sounds like your front-end was still using the client_secret value from an older payment intent
Or the multi-browser scenario
It must be multi-browser scenario
But the API calls all look normal to me
Because we create the payment intent before the page loads
And dont cache the secret etc..
Any tips of handling this?
Hmmm... ๐ค
How do you know it's the same customer?
because we use meta data to capture the invoice ID's we are including in the charge
they match
Well, either you could configure your DB to handle this scenario (removing the one that didn't get paid and retaining the PI that did get paid). Or you could cancel the older Payment Intent when a new one is generated https://stripe.com/docs/api/payment_intents/cancel
However it might be hard if they accidentally opened a new browser window and closed it immediately.
Yes, thats the issue
We have no way of linking the 2 payment intents (that I know of)
Or is the meta data the way?
That's why I was asking how you knew it was the same customer. I would use the metadata values you append to match up the Payment Intent to your invoice numbers.
Ok
We can do that
As a last resort if we cant match the payment intent
Or maybe put a hash in the metadata ?
Either option that is more reliable for you. The metadata property is pretty flexible in terms of what you can add to it.
ok, thanks, got it