#sammy's dad
1 messages · Page 1 of 1 (latest)
Hi there, did you have a chance to go through https://stripe.com/docs/products-prices/pricing-models#usage-based-pricing ?
Yes, I read it multiple times. Although I want to include the entire monthly usage to the last second, Stripe metered model doesn't support.
- I do need to wait until the billing period to end first. So I can aggregate and calculate the total monthly usage.
- However, Stripe model won't let me add an usage after the billing period passes. OR can I report usages retroactively by setting usage_record.timestamp?
" After the grace period, you can’t report usage from the previous billing period."
I still struggle to understand you problem, do you have difficutly in updating the usage within grace peroid?
A few minutes of the grace period will not work for us that 1) it takes time for us to accurately calculate 2) if my calculation logic is either down and slow, I will easily blow the grace period. I can't bet on the grace period.
My problem is simple. I want my metered subscription to include the full monthly usage. The flow will be: billing period ends -> invoice auto created and paused -> I calculate and report the usage to Stripe -> invoice unpaused -> invoice paid & finalized.
that's not possible, you need to report any usage before period end(which I know can be annoying, it's feedback wre're aware of).
OK. That's what I wanted to confirm that it's a Stripe's limitation. Again, my usage case is just like the utility bill, where reports all usages during the billing period THEN an invoice generated AFTER.
if you want a workaround, you can calculate the exact dollar amount in your own logic and add that as an Invoice item to the draft invoice, but then it's not taking advantage of our metered reporting
So the work around is that do not use metered, so the flow will be.
billing period ends -> invoice.created event (is the status DRAFT at this point?) -> I manually add an invoice item (the usage $ value) -> invoice automatic flow continues ?
Right - I read that article too. The one hour wait window is def better than a few minutes of the grace period. For some reason, my system is down/slow that if I can't insert an invoice item ($ value usage), Stripe will generate a $0.00 invoice?
Another word, how could I make my flow bulletproof that I don't end up with an incorrect invoice ($0.00 invoice) because of the delay on my part?
we wait 72 hours if your webhook is broken
https://stripe.com/docs/invoicing/integration/workflow-transitions#finalized paragraphs below the code snippet
I am aware of the 72 hour wait if I don't respond with 200 on the webhook event. That makes me implement the usage reporting logic synchronously.
@viral lily Thank you so much for the answers. I have another question.
My price model is 1) I am billing 1% interest MONTHLY 2) There are annual minimum charge of $5 and $1000 max charge. Again, the min/max are looked annual basis.
Could Stripe support my price model? The complexity is that to calculate min/max, Stripe needs to look back at previous bills. This seems like an unsupported case. Could you confirm?
doesn't seem like anything we natively support
Thanks for the confirmation.