#stellar-invoices
1 messages · Page 1 of 1 (latest)
i'm trying to get a preview of the invoice when updates are applied to a subscription
the net amount and items in the upcomingInvoice is different from the actual invoice
i'm using this invoices.retrieveUpcoming because i want the proration amounts
I see, can you send me the request ID so that I can take a look? here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_XivbFuFYb0deQ1
Thanks, give me a sec to take a look
I'm unable to see the response because the GET response is not cached.
Can you tell me the amount that you are expecting vs the amount that you are getting the API?
this is the array of description of invoice lines, the last one add the extra amount, it shouldn't be there, line 2 - 3 already take care of it
Hmm, I thought the problem is with amount?
No worries, so please correct me if I'm wrong.
You expectation is the first 3 lines, but the API returns 4 lines, is this the correct understanding?
Hmm, but it looks different than the request that you passed to me iar_XivbFuFYb0deQ1, the quantity is 3 in this request.
yeah
it may bbe old
i will create a new request
ok here is the request: req_zHUlCYocVAVarj corresponding to the screenshots
OK, thanks. So the upcoming invoice should contain
- 4 x price_1KYOGRSAuIq5vjOhesZ0uLv3
- 1 x price_1KYOGSSAuIq5vjOhZtcv8oyT
- proration for price_1KYOGRSAuIq5vjOhesZ0uLv3 assuming the update happens at 1 March 2022 05:42:50 UTC
yes
request also has coupon, but they are product specific so they won't be applied to these products
what question r u referring to?
Sorry I mean does it clear your doubt? because you specify 4 x price_1KYOGRSAuIq5vjOhesZ0uLv3 in the request, therefore it shows up in line 4 of the response.
oh sorry!!!
this isn't right
I think the description array is what confuses you, may I know from which response property did you get it from?
invoice.lines.data
Ok, can you check the type of the last item, is it susbcription or invoiceitem ?
type=subscription
Thanks for confirming. So the lines array contains both invoiceitem and subscription items. The first 3 items are what you see in the invoice from Dashboard, and the last one is the subscription item that make up the invoice.
So I'll suggest to you do a filter and only present the items which type=invoiceitem