How can we create a subs using appSubscriptionCreate such that the cancellation is deferred upto end of billing cycle but the upgrade is immediate i.e. the old subs is cancelled immediately and prorated upgrade plan starts. Given, that this subs behavior is handled by replacementBehavior but that can have only one behavior.
And the docs mentions that this behavior of appSubscriptionCancel is also handled by `replacementBehavior`
appSubscriptionCancel
mutation
Cancels an active app subscription, stopping future billing cycles. The cancellation behavior depends on the replacementBehavior setting
replacementBehavior
•AppSubscriptionReplacementBehavior
Default:STANDARD
The replacement behavior when creating an app subscription for a merchant with an already existing app subscription.
Hide enum values
APPLY_IMMEDIATELY
Cancels the merchant’s current app subscription immediately and replaces it with the newly created app subscription.
APPLY_ON_NEXT_BILLING_CYCLE
Defers canceling the merchant’s current app subscription and applying the newly created app subscription until the start of the next billing cycle. This value is ignored if the new app subscription is using a different currency than the current app subscription, in which case the new app subscription is applied immediately.
STANDARD
Cancels the merchant’s current app subscription immediately and replaces it with the newly created app subscription, with the exception of the following scenarios where replacing the current app subscription will be deferred until the start of the next billing cycle.
-
The current app subscription is annual and the newly created app subscription is annual, using the same currency, but is of a lesser value.
-
The current app subscription is annual and the newly created app subscription is monthly and using the same currency.
-
The current app subscription and the newly created app subscription are identical except for the
discountvalue.