post https://api.sandbox.cleeng.com/3.1/subscription_switches
This endpoint is used to upgrade or downgrade a subscription to another subscription plan. Use either subscriptionId
OR customerId
and fromOfferId
together. As these last two parameters are deprecated, subscriptionId
is going to be the only option to use this endpoint.
Important
Subscription upgrade and downgrade feature requires compatibility of the payment connector and payment gateway. Currently the feature is fully supported for the following: Adyen, PayPal. Please contact Cleeng Broadcaster Support Team if you wish to use other payment connectors/gateways.
Errors
Error code | Explanation |
---|---|
VALIDATION_ERROR | General input validation error. Details about error will be returned in message field in the response. |
PAYMENT_GATEWAY_NOT_SUPPORTED | The customer’s subscription was purchased with a payment gateway that is not supported by switch functionality. The following payment gateways are supported: - Adyen - Paypal |
RECURRING_PROCESS_ALREADY_STARTED | The customer's subscription is currently during the recurring payment process. Once a new billing cycle begins it will be possible to use switch functionality. |
ALREADY_HAS_ACCESS | The customer already has an active subscription to the target offer. |
TO_OFFER_COUNTRY_NOT_ALLOWED | Target offer is not accessible in the customer's country. Possible when geo-restriction was enabled on the target offer. |
TO_FREE_OFFER_NOT_ALLOWED | Switch functionality is not supported for offers with price 0. |
SWITCH_NOT_DEFINED_IN_SWITCH_SETTINGS | Subscription switch between the two given offers was not defined as possible in the dashboard. |
SUBSCRIPTION_WITH_COUPON_NOT_ALLOWED | Switch functionality is not suported for a subscription with a coupon applied. |
SAME_TARGET_OFFER | The target offer is the same as the current offer. |
SWITCH_IN_PROGRESS | The customer’s subscription is currently undergoing the switch to another one - the processing has already started. |
OFFER_INACTIVE | The target offer is inactive. |