#Pavan-upcoming-discount
1 messages ยท Page 1 of 1 (latest)
ok
Do you have the request ID from the request where you're seeing this?
Take this example
There is an existing subscription
i have passed same quantities for upcoming Invoice
amount due should come 0
but it is not
and also how to apply discount while calling upcomingInvoice
@opal dome
Apologies for the delay, taking a look.
Suppose a user has active subscription, item1: 100 and item2: 100 and i ask upcoming invoice with same quantities then amountDue should come 0 right ? because there is no change of quantities
No, the amountDue will show the amount that would be due if this invoice was generated. It does not show a delta between the current expected next amountDue and the amountDue created by simulating alterations to the subscription. If you wanted to calculate this delta then you would need to preview two invoices (one with changes, and one without) then calculate the difference between the amountDue values.
Weird, is there any other API which shows the expected ?
That shows the expected difference?
yes
No, currently the only way to do this is the path I mentioned earlier.