#msms-subscription-dates
1 messages · Page 1 of 1 (latest)
Hello! Good questions, and I'm not sure! But this should be relatively easy to test – bear with me
I know that canceled_at and ended_at (there's no end_date field) can likely differ
Oh sorry yeah I meant ended_at
For example, if I chose to cancel my subscription today but it's only actually set to cancel (end) at the end of the current billing cycle
Checking on start_date
In that case I would prefer to use the later date since even after the day that the user decided to cancel the sub, they still have access to the locked content
what field would the later date be stored in?
ended_at would be the timestamp the subscription actually ended/cancelled: https://stripe.com/docs/api/subscriptions/object#subscription_object-ended_at
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 so it seems I can simply rely on start_date and ended_at
since start_date is (roughly speaking) the time the subscription is created or paid for, and ended_at is filled with a value once the subcription end due to natural end or cancellation end. is my understanding correct?
Yes, but start_date will likely have a value even for subscriptions there were never active
I see, and what was the difference between created and start_date?
I feel like if I want 100% accurate results, I would need to record the start and end dates myself over time
In most cases, there isn't. Only if you were backdating a subscription
One last question, when a user cancels and resubscribes, is the same Subscription object reused, or is the old Subscription object left to die/expire and a new Subscription object is created?
There's likely a better way to get the data you need via reports: https://stripe.com/docs/sigma/billing
Oh I wasn't aware of that, thank you! I will check it out
That would be a new subscription. The canceled status is final
Okay perfect, thanks a lot for your help! I really appreciate this discord channel, been helpful many times! is there a place where we can leave feedback for this channel?