#Benoît
1 messages · Page 1 of 1 (latest)
Hi ! Ok !
To achieve this you would need to write some custom code to generate monthly invoice and ignore the invoice of the subscription.
Could this custom code create 12 separated invoices that would be triggered when their time has come each month ?
I would like to avoid making a monthly recurring batch myself on my server
Like I said above this would be custom code, so it's completely up to you.
Yes, i was not clear enough.
I will write a custom code. But instead of writing a custom batch to "manualy" monthly invoice my customer, i wondered if i could write a custom code that would create 12 upcoming invoices, having their own trigger date (throught Stripe API)
I'm sorry I don't understand the different between the two options. Either create one invoice at a time when neeeded, or create the twelve invoice in advance?
I would like to know if i can create the 12 invoices in advance with Stripe API, in one time, instead of making a batch on my side that would monthly create a unique invoice.
Technically yes, with https://stripe.com/docs/api/invoices/create, but a few things to note:
- You don't want the invoice to actually charge the customer, since the customer will be charged by the Subscription itself. For this you could mark the invoice as "paid out of band": https://stripe.com/docs/api/invoices/pay#pay_invoice-paid_out_of_band
- And not sure if you will be able to set to correct start/end dates of each Individual invoices. You'll need to make some tests to check this.