#amin_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1286187196927447100
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I'd recommend using new meter events for usage based billing: https://docs.stripe.com/billing/subscriptions/usage-based/implementation-guide
For the new meter event integration, it has one-hour grace period by default to submit the usage after the period ends: https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#configurable-grace-period
@wraith mulch thanks, I can see that it can be still extended to 72 hours,.
still a bit unsafe for us as the whole calculation will happen after the billing cycle ends and it can take time, might have to retry if there was any error.
Please note that grace period will only work if for meter event integration (https://docs.stripe.com/billing/subscriptions/usage-based/implementation-guide). Legacy usage record API (https://docs.stripe.com/api/usage_records/create) doesn't support grace period
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I see, I am using Legacy usage record API atm, so @wraith mulch what is your recommendation, should I totally ignore usage metering/subscriptions and just create manual invoices each time?
You should upgrade to the new meter event integration for metered billing on the subscription: https://docs.stripe.com/billing/subscriptions/usage-based/implementation-guide
This is the new way to integrate metered/usage billing for subscription
OK I understand @wraith mulch , let's say in the case of an error the system couldn't submit metered events within 72 hours window, what happens? would "0" invoices be sent to cusomers? how can I recover from those cases?
$0 will be created and sent to the customer
If this happen, your system can:
- Charge the usage to the next billing cycle; OR
- Create an one-time invoice for the usage that fails to submit
that is great, but still can the 72 hours be increased, let say a week?
72 hours is the maximum duration of the grace period and it can't be increased further