#sammy's dad

1 messages · Page 1 of 1 (latest)

proud muralBOT
glass tree
rugged scaffold
#

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.

  1. I do need to wait until the billing period to end first. So I can aggregate and calculate the total monthly usage.
  2. 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."

glass tree
#

I still struggle to understand you problem, do you have difficutly in updating the usage within grace peroid?

rugged scaffold
#

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.

proud muralBOT
rugged scaffold
#

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.

viral lily
#

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).

rugged scaffold
#

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.

viral lily
#

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

rugged scaffold
#

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 ?

viral lily
#

invoice.created event (is the status DRAFT at this point?
yes

#

yes overall

rugged scaffold
#

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?

viral lily
#

we wait 72 hours if your webhook is broken

rugged scaffold
#

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.

rugged scaffold
#

@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?

viral lily
#

doesn't seem like anything we natively support

rugged scaffold
#

Thanks for the confirmation.