Dark Mode

Subscription Cancel by ID API


The following endpoint cancels a single Subscription

/subscriptions/:id/cancel

Run in Postman

Request Attributes

id

String
Mandatory

Unique identifier of the Subscription to be cancelled

Example
curl -u [Base64({Your_Server_Key}:)] \
-X DELETE https://api.durianpay.id/v1/subscriptions/sub_vUoR0w6c6j3912/cancel \
-H "content-type: application/json"'

Response Code

200 - Success

1
2
3
4
5
6
7
8
{
    "data": {
        "id": "sub_vUoR0w6c6j3912",
        "status": "expired",
        "started_at": "2021-09-30T12:58:38.210535Z",
        "cancelled_at": "2021-10-01T12:19:20.851102Z"
    }
}

401 - Unauthorized Access

404 - Not Found