v1
latestOpenAPI 3.1.02026-07-26500375.1 KBSubscriptions
Create Subscription
The following endpoint registers a recurring billing agreement for a customer and returns the subscription in pending status. No payment method is collected at this step. The subscription is activated separately by its first payment (hosted checkout, or the Charge Subscription endpoint).
post/v1/subscriptions
Headers
Content-Typestring required
Indicates the media type of the resource. value: application/json
X-Request-IDstring
Optional client-supplied idempotency and tracing ID, echoed back in the response.
Request body
Example request
{
"customer_id": "cus_456",
"amount": {
"currency": "IDR",
"value": "10000.00"
},
"interval_count": 1,
"return_url": "https://merchant.com/subscription/success",
"subscription_ref_id": "sub-ref-0001"
}Response
Subscription created in pending status.
Example response
{
"status": "success",
"data": {
"id": "sub_xyz123",
"merchant_id": "mer_123",
"customer_id": "cus_456",
"amount": {
"currency": "IDR",
"value": "10000.00"
},
"interval_count": 1,
"checkout_url": "https://checkout.durianpay.id/s/sub_xyz123",
"return_url": "https://merchant.com/subscription/success",
"subscription_ref_id": "sub-ref-0001",
"created_at": "2026-03-01T10:00:00Z",
"updated_at": "2026-03-01T10:00:00Z"
}
}