#Pavan-upcoming-discount

1 messages ยท Page 1 of 1 (latest)

opal dome
#

Hey there ๐Ÿ‘‹ please bear with me, I'll get to this ASAP.

humble hatch
#

ok

opal dome
#

Do you have the request ID from the request where you're seeing this?

humble hatch
#

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

opal dome
#

Apologies for the delay, taking a look.

humble hatch
#

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

opal dome
#

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.

humble hatch
#

Weird, is there any other API which shows the expected ?

opal dome
#

That shows the expected difference?

humble hatch
#

yes

opal dome
#

No, currently the only way to do this is the path I mentioned earlier.