#corinne-billing-usage
1 messages · Page 1 of 1 (latest)
If you're using metered usage, then that should bill in arrears (e.g. at the end of the billing period): https://stripe.com/docs/products-prices/pricing-models#metered
I'm confused about how it is that the customer is being charged ahead of time if you're using metered billing
AH, I just reread your response and realized that you were asking how to do that
Apologies for the misread
The docs I sent should get you started and I'm here to assist if you have questions about the specifics
NP. I think our implementation is quite complex when it needed to not be. Basically, users start for free and this generates an invoice. This has no charge. Then, when a user goes over the threshold, this is metered billing. The problem is that we need to have this threshold trigger for the billing period in addition to the billing period to be set to the end of the month. How can this be done?
Okay, so you have billing period A and billing period B. Chronology looks like:
- Customer starts a free trial which begins billing period A
- Customer uses service and accumulates usage until a threshold is reached during billing period A
- Threshold causes customer to get billed for their usage during billing period A and pays at the end of billing period A
- Customer starts billing period B and is now accumulating usage for billing period B, to be paid for at the end of billing period B
Does that fit your use-case?
Not quite. A user can always use our services for free, each calendar month, within certain limits. If the user wishes to go over these limits within a calendar month, they have to pay. This is dealt with using metered billing. Each month, the limit resets and users can access again for free. If they hit the limit, they are charged, if they don't, we don't switch from this 'free trial' behaviour. Are you suggesting we have two billing cycle periods per calendar month, one is essentially a free trial, recurring monthly (billing cycle A) with a billing cycle period triggered by our usage threshold. If this is triggered, we then start metered billing (billing cycle B) where we can use a custom billing cycle, so that invoices are sent at the end of the month? Surely we can have one billing cycle with 2 triggers (calendar month end and usage threshold). Can we not create our own calculated param for billing cycle anchor to perform this?
Ahhhh, I see. In that case, why not simply report 0 usage until the threshold is reached each month?
and if we report 0 usage, there is no invoice that can be raised at the start of subscription?
I think you still get a zero-dollar invoice, but the customer does not get charged
Ah, yup.
Even though customers are charged at the end of the billing period for metered subscriptions, an initial invoice is still created for tracking purposes.
https://stripe.com/docs/billing/subscriptions/metered#provision-access
so we have 1 billing cycle, starting when our usage threshold is exceeded. This is metered billing. We have this fixed for the end of month invoice, and we can do this using the billing cycle anchor as described here https://stripe.com/docs/billing/subscriptions/billing-cycle So, all we need to do to get invoices dated for the end of the month is to fix this billing cycle anchor from the default? Do we not need to consider combining this with backdating invoices to the beginning of the month?
Invoices are automatically back-dated when you use metered billing. You should only need to set the billing_anchor when the subscription is created. That will ensure that all future billing cycles begin and end on the same day each month.
Are you wanting the customer to be charged for the usage that occurs before the threshold is reached? Or do you want them to only be billed for the usage that is accrued after the threshold is reached?
only after this threshold is reached
Ah, okay. So in that case you would need to track the usage (without reporting it) until the threshold is reached, then you would revert that aggregated usage to zero and start tracking and reporting new usage from then on until the end of the billing cycle when it resets again.
Does that make sense?
yes, many thanks!
sorry - quick check, can I implement all this, even if I am using the stripe customer portal?
Two-shoes had to step out but I can help. Catching up on this thread and will get back to you in a minute
I don't see anything that would conflict with the customer portal at the moment. Do you have any specific concerns on how these might interfere?
Many thanks. One of my colleagues thought this billing_portal_cycle customisation was unavailable as we were using the stripe customer portal - am I correct in understanding this is not the case?