Subscription Cancellation
Manage your subscriptions with Zotlo
This API service is used to cancel a subscription that was created via Zotlo.
If the force parameter is sent with the value 1, the subscription is terminated immediately.
If force is not provided or has a value other than 1, the subscriber can continue using the service until the end of the current billing period.
Method
POST
Request Parameters
subscriberId: The email or phone number used by the user when starting the subscription.
packageId: It is the package ID that will be queried for the subscription of the user.
cancellationReason: The reason for the subscription cancellation.
force: If set to 1, the subscription is terminated immediately. Otherwise, the subscriber can continue using the service until the subscription expires.
Example Request
To send a request to the Transaction Report Service, you must include your Access Key, Access Secret, and App ID in the request headers. You can obtain these credentials from the Zotlo Panel → Developer Tools → API Keys section.
POST https://api.zotlo.com/v1/subscription/cancellation HTTP/1.1
AccessKey: ••••••
AccessSecret: ••••••
Content-Type: application/json
ApplicationId: •
Language: ••
{
"subscriberId":"[email protected]",
"cancellationReason":"Not Interest",
"force":0,
"packageId":"zotlo.premium"
}Successful Response Examples
If a Subscription Profile Exists and the Cancellation Is Completed
Successful Response Parameters
The parameters included in the successful response are as follows.
status
Indicates the subscription status.
active : User can continue to use their rights.
passive : User's rights have expired.
grace : The package renewal process could not be completed, but the user can continue to use their rights for a certain period.
realStatus
Provides the real status of the subscriber. Returns 'passive' if the user's account has been cancelled in any way. Different from 'status', 'active' will continue to return until the user's expiration date.
active : User can continue to use their rights.
passive : User's account has been cancelled in some way.Different from 'status'. 'Status' will continue to return active until the user's expiration date.
subscriptionType
Indicates the status of the user's subscription.
trial : The subscriber is still within the trial period.
paid : The user has transitioned to paid period and has been charged at least once for the package.
startDate
Start date of the subscription.
expireDate
Expire date of the subscription. Renewal will be made on this date.
package
Package information for the active subscription.
country
Country information of the user.
language
Language information of the user.
cancellation
Indicates whether the user's account is cancelled. Returns 'null' if the user account is active. If returned as an array, details of the subscription cancellation can be accessed.
cancellation.date
Date when the subscription was cancelled.
cancellation.reason
Reason for the cancellation of the subscription.
cancellation.code
Status code for the subscription cancellation given by Zotlo. Possible values include:
CP00001 : Subscription cancelled because automatic renewal could not be performed on the user's account.
CU00001: User cancelled their account voluntarily.
CU00002: System automatically cancelled the subscription after a refund process.
Failed Response Example
Our services return HTTP status code 200 for successful responses. For unsuccessful cases, HTTP status codes 400 or 500 are returned. An example error response is as follows:
Failed Response Parameters
Below are the parameters included in failed responses.
requestId
A unique request parameter generated and stored by Zotlo.
httpStatus
The HTTP status code associated with the response. Standard codes include 400 or 500.
errorMessage
Details of the error received. Error messages are sent according to the language parameter you send.
404001: Invalid endpoint
401002: AccessKey, AccessSecret parameters are incorrect.
400008: SubscriberId parameter is incorrect. 400009: Subscriber profile not found. 500000: Server error.
errorCode
The error code specific to Zotlo. Zotlo has unique error codes for each type of error.
404001: Invalid endpoint
401002: AccessKey, AccessSecret parameters are incorrect.
400008: SubscriberId parameter is incorrect. 400009: Subscriber profile not found. 500000: Server error.
result
This field can dynamically change. In case of an error, the response from the service may be returned filled with details or as an empty object.
Last updated
