Overview
The purpose of this call is to allow API users to cancel service subscriptions.
Business Rules
- Subscription cannot be pending a migration.
- Cancellations are not permitted where the Service Plan associated with the subscription is unlinked from a Package Plan.
- If the service type associated with the subscription is DNS Hosting or EME Email Domain, you cannot cancel the subscription if there are active email mailboxes associated with the domain.
- The subscription must be the lowest in the subscription hierachy.
- The subscription is owned by an account of the parent calling the API (in effect, only the RSP can cancel the subscription).
- The subscription cannot be subject to a service type migrate in flight.
- The subscription status must be Active.
- If service subscription is attached to a one to one package/service plan, and the service plan is mandatory a cancellation will be permitted. However, cancellations will not be permitted where the service plan is mandatory and the package plan has more than one service plan attached.
- Cancellations are not permitted where the service type setting 'Can't Cancel' is enabled. The exception is where the account feature 'Can't Cancel Override' is enabled.
- Cancellation dates greater than six months into the future are not permitted.
- Cancellation dates earlier than the start date of the subscription are not permitted.
- Cancellation dates earlier than the start date of the current billing period are not permitted. You cannot set a cancellation date that's within a closed period.
- Please note that if your package plan/service plan configuration is one to one, when the service subscription is cancelled the package subscription is also automatically cancelled. If there is a contract attached to the package subscription, break fees may be generated depending on the contract setup, and whether the contract is still active.
SOAP Example
API Call
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:emersion:api">
<soapenv:Header/>
<soapenv:Body>
<urn:CancelServiceSubscription>
<urn:ServiceSubscriptionID>4077475</urn:ServiceSubscriptionID>
<urn:CancelTimeFrame>Cancel On Specific Date</urn:CancelTimeFrame>
<urn:CancelDate>2021-06-03</urn:CancelDate>
<urn:SkipProvisioning>Y</urn:SkipProvisioning>
<urn:CancelReason>user cancel</urn:CancelReason>
<urn:CancelNote>User has changed providers</urn:CancelNote>
</urn:CancelServiceSubscription>
</soapenv:Body>
</soapenv:Envelope>
API Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:emersion:api">
<SOAP-ENV:Body>
<ns1:CancelServiceSubscriptionResponse/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Field Descriptions
All field names are case sensitive. Check enumerated values in the descriptions to confirm capitalisation and spacing. See field types for additional information..
| Name | Description | Required? | Field Type | Character limit | Values |
|---|---|---|---|---|---|
ServiceSubscriptionId | Service Subscription ID you wish to cancel. | Yes | Int | 543222 | |
CancelTimeFrame | This field dictates when the subscription will be cancelled. Note that if you elect to 'cancel immediately' or 'cancel end of today' it will be as of the timezone set on the service associated with the subscription. | Yes | String | Permitted values are: cancel immediately cancel end of today cancel end of period cancel on specific date | |
CancelDate | If you have elected to cancel on a specific date in the CancelTimeFrame parameter, you are required to enter your chosen date here. | 2021-05-03 | |||
SkipProvisioning | Generally when a subscription is cancelled it is moved to PendingProvCancellation status, where the service is either cancelled by automated provisioning or manual provisioning. Some service types permit you to move the subscription directly to PendingCancellation. If the service type supports it, you may use the SkipProvisioning flag to move the subscription directly to this status. | No | Boolean | Y N | |
CancelReason | The reason for the cancellation | Yes | String | Permitted values are: user cancel reverse churn in | |
CancelNote | Any additional notes you would like to add about the cancellation. | No | String | 4000 | 'User has change providers' |
Error Handling
| Error Message | Description |
|---|---|
Invalid ServiceSubscriptionID | This error will generally arise if the subscription belongs to an account that is not a child of the RSP performing the API call. It may also arise if there is data problems with the subscription, or the subscription ID does not exist. |
| The subscription ID must be the lowest in the subscription hierarchy | The subscription must be the lowest in the tier assigned to the customer account id. |
| ServiceTypeMigrate process is active | Subscriptions subject to a service type migrate in flight cannot be cancelled. |
| Subscription should not belong to ServicePlan which has been unlinked or removed from PackagePlan it belonged to | |
| Subscription is not active | |
| Service is mandatory against Package | If service subscription is attached to a one to one package/service plan, and the service plan is mandatory a cancellation will be permitted. However, cancellations will not be permitted where the service plan is mandatory and the package plan has more than one service plan attached. |
| The service has a domain still in use by an active mailbox. Please cancel all mailboxes first | If the service type associated with the subscription is DNS Hosting or EME Email Domain, you cannot cancel the subscription if there are active email mailboxes associated with the domain. |
| Subscription Period does not exist | This error can arise if there is currently no open billing period for the service. If you encounter this problem, please contact Emersion Support. |
| CancelDate is required | This error will arise when you have elected to cancel on a specific date, but have not provided a date. |
| CancelDate should not be earlier than BillingStartDate | Cancel dates cannot be set prior to the subscription start date. |
| CancelDate should not be earlier than StartOfPeriodDate | Cancellation dates must be within an open period |
| ServiceType of Subscription does not support SkipProvisioning |