Mutation
Parameters
Input for canceling a subscription
Cancellation Strategies
| Strategy | Behavior |
|---|---|
IMMEDIATE | Cancel immediately, entitlements revoked |
END_OF_BILLING_PERIOD | Cancel at period end, entitlements continue until then |
Cancel Reasons
| Reason | Description |
|---|---|
CUSTOMER_REQUEST | Customer requested cancellation |
PAYMENT_FAILURE | Payment could not be collected |
UPGRADE | Canceling to upgrade |
DOWNGRADE | Canceling to downgrade |
OTHER | Other reason |
Return Type
Returns the canceledCustomerSubscription object with:
| Field | Type | Description |
|---|---|---|
subscriptionId | String | Subscription ID |
status | SubscriptionStatus | New status (CANCELED) |
cancellationDate | DateTime | When cancellation was requested |
endDate | DateTime | When subscription ends |
Examples
Immediate Cancellation
Cancel at Period End
Common Use Cases
Customer churn
Customer churn
Cancel when customer explicitly requests cancellation.
Payment failure
Payment failure
Cancel after failed payment recovery attempts.
Account deletion
Account deletion
Cancel as part of account deletion process.
Related Operations
- Update Subscription - Modify instead of cancel
- Archive Customer - Archive customer and cancel all
