#brettski - Subscriptions
1 messages · Page 1 of 1 (latest)
Hello! Yep, that's how I would do it. Note that I think there might be some small drift between those two timestamps in some circumstances, so you might want to check and see if they're within X seconds/minutes/hours of each other, where X is less than the Subscription's interval.
So they could drift by more than a day?
I think it's possible, yes, especially if you're backdating Subscriptions.
How would we end up backdating subscriptions, specifically new ones?
It's unlikely to impact you, I just mentioned it for the sake of writing robust code. 🙂
I appreciate it. Thank you.
I was kind of hoping there was an integer with the times renewed, etc.
There's not an integer like that, but you can list all of the Invoices belonging to a particular Subscription and count them: https://stripe.com/docs/api/invoices/list#list_invoices-subscription
Oh, interesting approach.