#robotlos.
1 messages · Page 1 of 1 (latest)
Can you share the checkout session id
cs_live_b1iceypYOabQzNxxD1PsVNFahIpPiY4HMhqZK4VxU6MmLrjS7oOkYSdxYS
You're making the call to expire right after confirmation
Why is that?
But basically what's happeneing is payment is succeeding a tiny bit before the expiration happens
That flow doesn't make sense though
You shouldn't need to manually expire a session after payment
We intentionally expire around ~2-3 mins because of our internal requirements
But our understanding was that if we expire before e.g. 3ds is completed or checkout is completed there would be no charge from stripes end.
I see so this was a weird race condition then
well not exactly a race condition
But the expire request came in within a second of the payment being authd
How can this be mitigated? Meaning, is there a condition we can check before we expire?
No not really
To lets say maybe not expire or gracefully handle it soomehow
You don't know when customer will auth the payment
so it's impossible to handle really
If your requirment is to issue that expiry request after 2 min there's not a graceful way to deal really
Why does this requirement exist though
Maybe there's a better alternative to what you're doing
The default 30 min expiry for checkout sessions is too long for us
Its an internal requirement for how our product works. We can push it higher, but wouldn't this issue occur even then if we expire around the same time the authorization is done from stripe?
Yeah but why is this an issue?
If expiration request comes in within a second of authing the transaction, why is it bad that payment succeeded?
Because the end user is getting charged
It's not so much that the payment succeeded, but rather the user got charged when they should not have.
But we would also not rather get a payment succeeded event.
Yeah I think this is some race condition
It would need to involve some internal teams to investigate and determine the issue though
Sure, how can we create a support case for this so I can follow up?
Yeah I recommend writing in at https://support.stripe.com/contact/email providing all the details you provided here and just mention that you came in to our discord and we recommended you open up a ticket to pull in the relevant teams
Sounds good. I will do that and link to this thread.