#napolean_solo
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
You can add a custom Invoice Item to the upcoming invoice, that will contain the extra usage.
You will need to keep track of it in your own app, and then attach when the next invoice is created. If the customer cancels the Subscription, you can create a one-off invoice with the outstanding bill.
Perfect!
Can you explain how to add it through API?
@solemn plaza
also should I add it when i get invoice.upcoming event?
You can listen to invoice.created event: https://stripe.com/docs/api/events/types#event_types-invoice.created
And then create an InvoiceItem for that Invoice, while it's in draft state: https://stripe.com/docs/api/invoiceitems/create
Alright got it!