#deathnfudge_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/1478470061957320848
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there,
so just clarify, you want the billing cycle for example 01/01 - 01/31 but invoice finalization on 2/5?
Yes indeed.
This will keep things in line with how we've been charging. We ususally run the overage reports in the first couple days of the month and charge between the 3-7 depending on how weekends fall etc. It also gives our billing department time to do any auditing before the invoices are finalized.
Got it.
There is not a direct way of doing exactly that. You basically have to options.
First option would be the Invoice finalization grace period https://docs.stripe.com/billing/subscriptions/usage-based/configure-grace-period. However, that has a maximum of 72h.
Second option is more manual. You would have to listen to the invoice.created webhook event, update the invoice to auto_advance: false to prevent autom-finalization and then run a scheduled job on the 5th of each month to finalize
Ok. Thanks. I'll check with the billing department and figure out which option they prefer.
Sounds great
If we go with the grace period, will it default to the end of month + grace period or do we need to manually tell it to do that?
The way it works is, invoice (with auto_Advance: true) gets created at the end of the billing cycle. We send out the webhook event invoice.created. We wait for the 200 response from your webhook endpoint. After we received the response, we wait the grace period to finalize the Invoice.
Gotcha. Thanks.
Explained in this doc here: https://docs.stripe.com/invoicing/integration/workflow-transitions#finalized