#simeng
1 messages · Page 1 of 1 (latest)
It throws an error when I try to report usage after the invoice was created. Sth like the time stamp must after current subscription cycle start time
After the invoice is created, the usage of the past cycle can't be updated
From https://stripe.com/docs/billing/subscriptions/usage-based#report:
If aggregate_usage is set to sum on the price, your integration is allowed to write events occurring in the last 5 minutes of the previous period at any time in the current period (to accommodate clock drift). Events written this way are billed in the current period. For all other aggregate_usage values, the timestamp has to be within the billing period.
In that case is there any out of box event that I could use to trigger the report? We don’t have a clock event so far
Or can we directly update the product qty on a draft status invoice?
In that case is there any out of box event that I could use to trigger the report? We don’t have a clock event so far
There is no event to inform about the end of a cycle. Your system should monitor the billing cycle end timestamp and submit final report accordingly
Or can we directly update the product qty on a draft status invoice?
Since the price is set to usage-billing, it can be only perform with usage report
thx
one more question. If a user canceled the subscription through customer portal in the middle of the cycle. How we gonna report the latest usage?
The Usage should be accumulated until the timing of cancel from Customer Portal. Any time after that I don't think it will count
Yes, I mean when should I trigger that usage report? If a user click on the cancel button through the portal the invoice will be instantly created right?
When should I report the up to date usage?
Usage Report API calls should be sent before that timing already, no?
ie. if your customer cancel on July 19, you probably have sent the report usage on July 14 or July 15
Or do you mean you are actually accumulate the usage and only send it at the end-ish of the period
Yes we need to accumulate the usage at the end of the period. It was based on user DAU. it may change in every secs.
You can customize whether the subscription cancels immediately or at the end of the period by updating your portal configuration through the API or the Dashboard.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
😂 well per our product design. We do need it to be canceled immediately but also send the latest usage report.