SwapPlan
Changes the subscription plan variation for a subscription, allowing a subscriber to change plans, upgrade, or downgrade.
Stored Procedure Specific Information
Execute
You need to provide the SubscriptionId and the NewPlanVariationId to swap the plan variation of a subscription.
EXECUTE SwapPlan SubscriptionId = 'fd9d6200-bb12-43c5-9973-070bfc6f5e05', NewPlanVariationId = 'X2Q6MPRWZ2WYAB2SATFCFA5R'
In order to specify the value for Phases, you must create a well-defined JSON structure.
EXECUTE SwapPlan SubscriptionId = 'fd9d6200-bb12-43c5-9973-070bfc6f5e05', NewPlanVariationId = 'X2Q6MPRWZ2WYAB2SATFCFA5R', Phases = '[{"ordinal":0}]'
Input
| Name | Type | Required | Description |
| SubscriptionId | String | True | The ID of the subscription to update. |
| NewPlanVariationId | String | True | The ID of the new subscription plan variation. |
| Phases | String | False | A JSON array of Phase objects used to override the subscription's phases going forward. |
Result Set Columns
| Name | Type | Description |
| Status | String | The status of the subscription. |
| Success | Boolean | Whether the operation was successful. |