#unknown-user

1 messages ยท Page 1 of 1 (latest)

ionic nexusBOT
azure pawn
#

๐Ÿ‘‹ I don't think there's a way to add a line item to a subscription invoice. AFAIK you can only add invoice items

rocky quest
#

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?

azure pawn
rocky quest
#

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?

azure pawn
#

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.

rocky quest
#

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!

azure pawn
#

NP! ๐Ÿ™‚ Happy to help
Good luck

rocky quest
arctic garnet
#

๐Ÿ‘

#

hanzo had to head out, but if you have other questions I'm here to help!

rocky quest
#

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?

arctic garnet
#

Yeah unfortunately there's no way to specify sorting - it'll be reverse chronological

rocky quest
#

can you put in a vote somewhere for adding a new property to the invoice line item object for a sorting priority?

invoiceItem.sort_order perhaps?

#

that'd be pretty nice to be able to push credits and adjustments and incidental charges below a subscription on an invoice.