#wendy-invoice-upcoming
1 messages · Page 1 of 1 (latest)
Hi there! If this will be a one-time item for the next invoice, you can create an invoice item on the customer: https://stripe.com/docs/api/invoiceitems/create
The invoice item will be automatically pulled into the customer's next invoice
should i also specify the sub on this call if the upcomign invoice is for prorated refund of sub
Ah, yep, you should specify the subscription if you want this item to be included in the next invoice for a specific subscription. Otherwise the item will be included in the next invoice, whatever it may be (e.g. a customer may have more than one subscription, or you might create a one-off invoice)
wendy-invoice-upcoming
since it's prorated cancel subscription
we first create a stripe refund with the prorated $ which includes that new item line i add to customer/subscription level
then we create a credit note to the above refund
but how do i include the above item line here since it does not have il_... id
i only have ii_xxx id from that cust/sub item line
When you create the InvoiceItem you pass subscription: 'sub_123' and it will automatically be picked up by the next Invoice
oh wow, thank i will continue my test
bm but it's a il_tmp_... id and create credit notes endpoints don't like it
Okay let's take a step back because I think you're mixing up possibly a lot of unrelated concepts. You can't do a CreditNote on a future Invoice that doesn't exist yet, that is impossible.
What are you really trying to do?
the first invoice on create subscription has an addition charge of -ve amount (some loyalty $ customer has)
we want to prorate refund when del subscript
so we currently call get upcoming invoice to get he prorated amount/%
we currently creates a refund then credit note to that refund and this is without the whole -ve workflow
so maybe i have to make use of customer balance tx
instead to do this....
Yes you could use the customer balance, or add an InvoiceItem with a negative amount. Sorry I still don't grasp what you're describing at all
step back a bit
if we want to cancel a subscription now with prorated refund, what is the api call
i want that refund to include that new item like (-ve)
There is no way to "automatically refund". This is not something we support. You call the Cancel Subscription API and pass invoice_now: true and that will give you the proration and add credit to the Customer's balance and then you can figure out how you want to handle the refund
ok i think i created a credit note that looks like a possible one...the email to customer by stripe only includes this credit note for some reason
it used to do one with the original invoice then a receipt with those adjustment