Subscriptions Fetch API
Query Attributes
from
Integer
Optional
Timestamp (in Unix format) from when the Subscriptions should be fetched
to
Integer
Optional
Timestamp (in Unix format) up till when Subscriptions are to be fetched
skip
Integer
Optional
The number of subscriptions to be skipped. The default value is 0. This can be used for pagination, in combination with count
limit
Integer
Optional
Number of subscriptions to be fetched. Default value is 25. This can be used for pagination, in combination with the skip parameter
search
String
Optional
find subscriptions matching text with Durianpay Subscription ID.
Example
curl -u [Base64({Your_Server_Key}:)] \
-X GET https://api.durianpay.id/v1/subscriptions?limit=50&skip=10 \
-H "content-type: application/json"'
-H "Is-Live: true"'
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 24
{ "data": { "subscription": [ { "id": "sub_7HAtpFqE7g0944", "status": "wait_for_payment", "charge_type": "manual", "name": "Plan/Package Name", "started_at": "2021-10-01T12:58:38.210535Z", "billing_period": "monthly", "billing_period_count": 1, "customer": { "id": "cus_g0tw6z7sDF4506", "email": "jude.casper@durianpay.i", "mobile": "+628978678511", "given_name": "Jude", "middle_name": "", "sur_name": "Casper" } } ], "count": 1 } }
400 - Invalid Request
401 - Unauthorized Access
500 - Internal Server Error