#unknown-user
1 messages ยท Page 1 of 1 (latest)
๐ I don't think there's a way to add a line item to a subscription invoice. AFAIK you can only add invoice items
Morning! Thanks for the help, I really appreciate it.
In the past, We've set the subscription.create to have a short trial period of several minutes. This causes the first invoice generated to be $0. Then 5 minutes later the "real" invoice will be passed to our webhook listeners, and at that point we can attach the one time line item at that point. But that is clunky and the delay can be frustrating to customers.
Let me step back a moment and remove the need for an invoice line item.
How would you recommend decreasing the price on a subscription by $10 (a specified fixed discount) for the first invoice only without issuing a coupon?
Can pending invoice items be created through the API?
Have you looked into customer credit balance yet?
https://stripe.com/docs/invoicing/customer/balance
Some common use cases for customer credit balances include:
Issuing a credit note to create a credit that reduces the amount due on the next invoice.
I believe we have used these elsewhere in our codebase. So in this scenario, we'd issue a credit note via creditNotes.create and it'd appear on the invoice created as a side effect of the subscription.create. Does that sound correct?
The credit note will apply the balance to the customer. The customer credit balance automatically applies to the next finalized invoice (subscription invoice in this case) and offsets the amount.
I'll run a couple experiments and see how it's displayed. This might be a good path forward.
Thanks for your help this morning!
NP! ๐ Happy to help
Good luck
I've been digging through the docs, and I think that I'm going to try this we well:
https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items
Hi @arctic garnet Thanks!
The second option of using stripe.invoiceItems.create() and attaching a pending line item to the customer appears to be working well.
Follow up on that -
Is there a way to specify sorting of a line item on an invoice? Are we stuck with reverse chronological?
Yeah unfortunately there's no way to specify sorting - it'll be reverse chronological