Dark Mode

Subscription Fetch by ID API


The following endpoint retrieves the details of a single Subscription

/subscriptions/:id

Run in Postman

Path Attributes

id

String
Mandatory

Unique identifier of the Subscription to be retrieved

Query Attributes

expand

String
Optional

Used to retrieve additional information about the Subscription. Supported values are: customer,order. Example: /subscriptions/sub_jrmFNNJu5F99?expand=order&expand=customer

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

Response Code

200 - Success

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
    "data": {
        "id": "sub_vUoR0w6c6j3912",
        "plan": {
            "id": "sub_plan_WdFvTrtP5Z6646",
            "name": "Plan/Package Name",
            "billing_period": "daily",
            "billing_period_count": 1,
            "grace_period": "annually",
            "grace_period_count": 24,
            "price": "20000.00",
            "subscription_ref_id": "merchant_sub_ref_id"
        },
        "charge_type": "manual",
        "status": "expired",
        "started_at": "2021-09-30T12:58:38.210535Z",
        "next_due_date": "2021-09-29T12:58:38.210535Z",
        "billing_cycle_count": 10,
        "amount": "40000.00",
        "active_order_id": "",
        "link": "https://links.durianpay.id/subscription-link/n7Hmh8"
    }
}

401 - Unauthorized Access

404 - Not Found

500 - Internal Server Error