#nunuyoo

1 messages · Page 1 of 1 (latest)

brazen pebbleBOT
solid sinew
#

Yes you can't just update it. Subscription status is a state machine and is decided by the payment of its latest Invoice

late gust
#

So if cancelling the open invoice in retry state will change subscription to active?

solid sinew
#

I suggest testing in test mode

late gust
#

Our issue is that when user downgrades from say a yearly to monthly plan in retry period, no amount is charged, and customer gets some credit balance.
Also invoice remains in retry stage.

#

What is the solution for this

solid sinew
#

Yes I know what you are asking and it's a common ask. There are workarounds (typing)

#

Oh wait, when you say "user downgrades from a yearly to monthly plan", does your system call Subscription Update API or do they change on ie. Customer Portal?

late gust
#

yes api

solid sinew
#
  1. Checking the Sub's latest_invoice status before ever making the Subscription Update API. This will prevent it happens in the first place
  2. When calling Update Subscription API, disable proration and reset billing_cycle_anchor to now This will immediately set the cycle to the time of update and generate new Invoice on new price. However if customer come back to pay the old Invoice, they will end up with double-paid for a period of time
  3. When calling Update Subscription API, disable proration and don't reset billing_cycle_anchor. This will keep the old cycle anchor.