post https://api.sandbox.midtrans.com/v1/subscriptions//cancel
Cancel a customer's subscription account with a specific subscription_id
so that the customer is not charged for the subscription in the future. Successful request returns status_message
indicating that the subscription details are updated.
The difference between cancel subscription and disable subscription is that cancel subscription also stop any pending retries on subscription due to previous failure on charging customer (might be caused by timeout to payment provider or customer balance is insufficient).
Cancel Subscription Method
HTTP Method | Endpoint | Description |
---|---|---|
POST | BASE_URL/v1/subscriptions/{subscription_id} /cancel | Cancel subscription |
Disable Subscription Response
{
"status_message": "Subscription is updated."
}
{
"status_message": "Subscription doesn't exist."
}
{
"status_message": "Sorry, our system is recovering from unexpected issues. Please retry."
}
JSON Attribute | Description | Type |
---|---|---|
status_message | Message describing the status of the result of API request. | String |