#FlyingZergling
1 messages · Page 1 of 1 (latest)
What expiration date? On a card? On a Subscription? Please be more specific
The subscription expiration timestamp
I'm not sure I understand the problem. It sounds like a run of the mill race condition, so why not just change the order that you're doing things and update the expiration timestamp first, then correct if a payment fails?
Let’s say, a customer has a subscription which expires on Feb 8, 2023, 17:00 utc. I think Stripe will handle renewal after that time. So when we get the webhook event, it is Feb 8,2023, 17:30 utc
There is 30 mins, the subscription is expired, but not renewed yet
The customer may loose access during this 30 mins
So why not set a new expiration in your database when payment is coming due? You get webhook notifications ahead of when a Subscription renews: https://stripe.com/docs/api/events/types#event_types-invoice.upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay, that’s something we can try. Normally, how long does it take to renew a subscription on Stripe if payment goes through smoothly?
There's a 1 hour period where the Invoice can be updated, so aside from that, it should be instant (unless the customer is set up to pay via a delayed payment method like ACH or SEPA)