#LordGrim

1 messages · Page 1 of 1 (latest)

uneven marshBOT
tame raptor
#

👋 happy to help

#

it really depends on what you want to happen

acoustic osprey
#

Need a very simple usecase.
Assuming a subscription of $100 (plan price) * 10 (quantity) = $1000

Expected behavior:
On downgrading in a running cycle, from 10 quantity to 5 quantity.
New invoice of $100 (plan price) * 5 (quantity) = $500 should get deducted from the previous invoice's credit
And user should get refund of remaining $500.

tame raptor
#

it won't technically happen this way because of prorations

#

so let's say you started the subscription in the 1st of the month

#

and on the 15th you want to change the quantity

uneven marshBOT
tame raptor
#

the invoice will be calculated as such

Remaining time (quantity 10) 100 * 10 * 15/30 (-500)
New price (quantity 5) 100 * 5 * 15/30 (250)

#

the remaining 250 would be added to the Customer Balance

#

and it will be used to pay subsequent invoices

coarse salmon
#

Hi! I'm taking over my colleague. Please, let me know if you have any other questions.

acoustic osprey
#

So, according to what @tame raptor mentioned, I want exact same flow with some extra functionalities.
i.e. On downgrading the subscription's quantity

  • automatically generate a new invoice with the updated quantity
  • deduct the new prorated amount for new invoice from the previous invoice
  • refund the remaining amount to user
#

will all these cases will be handled by just using "subscription.update({... quantity: newQuantity })"?

coarse salmon
#

Please, let me know if you have any other questions.