#obo-subscription-upcoming
1 messages · Page 1 of 1 (latest)
invoice.upcoming
see https://stripe.com/docs/billing/subscriptions/webhooks which has more details
obo-subscription-upcoming
awesome, thank you, will take a look
Hmm, it seems to be 3 days as the shortest time window. It's not possible to receive something, say, an hour before the invoice gets sent out?
no that's impossible
got it, thanks
do most customers doing meterd billing like this follow a specific usage pattern to deal with this?
we've been doing things a certain way for awhile, and I'm wanting to make sure there's not a "better way"
by usage pattern I mean, how they're scheduling usage updates to stripe corresponding with the renewal date
usually you report usage either in real time or aggregate it hourly/daily
if I recall correctly, stripe has an hour time window before an invoice is "finalized" for editing purposes, would it be possible to get a webhook when things enter that state and then edit the invoice with values during that 1 hour window?
no that's impossible
You can modify the Invoice sure, but you can't report metered billing usage at that point
I apologize for the confusion, I more meant could I use this endpoint: https://stripe.com/docs/api/invoiceitems/update to basically just modify the quantity on the draft invoice
not create a usage record, but rather just hard update the invoice to the correct value
You can't modify the line items on an Invoice that come from a Subscription, so no. You can create a new InvoiceItem to reflect the amount you want to charge yes
got it, makes sense
if I add new invoice items like you mentioned, would you see any issues there for things like 3DS or indian banking?
and would those issues be different than doing the normal usage reporting route?
Indian banking requires a Mandate with a min/max amount and such so you need to make sure this would be configured properly. See https://stripe.com/docs/india-recurring-payments
But otherwise no it should work the same in both cases
got it, thanks
So yeah if what you want is once a month a new Invoice is created and then you go and add an extra line (an InvoiceItem) for the additional amount, then listening to the invoice.created Event on your webhook endpoint is likely the best approach
any other things I should worry about here? I feel like I'm kind of doing an antipattern, but I do like the flexibility of this option as it gets us in the hour before state, while also allowing us to basically add on whatever we need to an invoice (for example if we added new products down the line)