v1

latestOpenAPI 3.1.02026-07-26500375.1 KB
Subscriptions

Charge Subscription

The following endpoint activates a subscription with its first charge, or updates the customer's stored payment method.

post/v1/subscriptions/{id}/charge

Path parameters

idstring required

Durianpay's subscription identifier. ID that you received on Create Subscription API Response

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

payment_method_unique_id'SHOPEEPAY' required

Binding reference for the customer's bound payment method.

Example request

{
  "payment_method_unique_id": "GOPAY"
}

Response

Charge executed, or payment method updated (no charge).

statusstring
dataobject

Example response

{
  "status": "success"
}