#numericity-subscription
1 messages · Page 1 of 1 (latest)
Hey @quaint nova
I'm using Stripe subscriptions, and I'd like to be able to group some other data based upon Stripe's billing periods
could you please elaborate?
For example, a user gets billed monthly, and in each of those billing periods, they are allowed to enrol on X number of classes. Is there a way I can get a list of billing periods past/upcoming?
So that I can group the enrolments by the billing period they belong to. That way, I can calculate whether they are within their limit for the specific billing period
why not use metered billing in that case
As far as I understand it, metered billing adjusts the price based on the usage?
These users pay a flat fee for up to X enrolments per period
and after that would they have to pay if they want more?
Oh I see
I guess you'd have to build this logic in your system
what you can do is listen to customer.subscription.updated events
and save the cycle start/end dates
and then check the info in your own database
That's what I thought. Can Stripe only provide the current period?
Some classes might be weeks/months in the future, and therefore outside the current cycle
you can see the upcoming invoice which will give you a preview of the next invoice/billing cycle
Ok, thanks. I assume failed payments don't affect the current_period_start and current_period_end?
They won't, no