#morunas-subscription
1 messages · Page 1 of 1 (latest)
Hi! Can you clarify your question? You want to preview the next invoice, while adding credit notes to it?
Credit notes are for invoices that are already finalized.
In the case op an upcoming invoice, the invoice itself doesn't exist yet, so it makes more sense to directly change the invoice_items with https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-invoice_items
correct, but this is an upcoming invoice for a subscription that is not yet created
Indeed, and I did go for that at first, however tax_rates then apply to those invoice_items, because they will reduce the due_amount before tax_rates are applied, and not after
To give context, this is a situation where our clients can upgrade from "multiple small subscriptions with various billing anchors in favor of a new big subscription". I want credit back the remaining time for each small subscription, and create the new subscription.
And using payment_behavior default_incomplete on the subscription, and then adding credit notes to its invoice, I can do that "special type of proration" (so it's not like changing one subscription for another, but changing from multiple to one)
What I am still in doubt on the best way to accomplish is the previewing, which before I was using precisely invoice_items on Invoice:upcoming
I'm not sure I exactly follow your requirements, but it's not possible to add a credit note to an upcoming invoice.
If you want to manually compute a proration to discount the new subscription, you should be able to use the upcoming invoice and pass an invoice_items with a negative amount.
How do I manually create a proration?
Here's a scenario for a given customer:
- Customer first buys the Small Subscription A (yearly)
- 1 month later customer buys the Small Subscription B (yearly)
- 5 months later customer decides to upgrade to a Big/Full Subscription
Here, the customer should preview how much credit they get back from the Unused time on the Small Subscriptions A and B, and how much will be due for the new Big/Full Subscription
So it's a Many-to-one subscription change with manual proration
You'd use this endpoint, providing the the relevant details for the upgrade/downgrade: https://stripe.com/docs/api/invoices/upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.