Dark Mode

Payment Capture API


The following endpoint captures a single preauth payment

/payments/:id/capture

Path Attributes

id

Integer
Mandatory

Unique identifier of the Payment to be captured

Request Payload Attributes

amount

String
Mandatory

Final capture amount

Example
curl -X PUT \
  https://api.durianpay.id/v1/payments/pay_wA2X2Mvm2d4965/capture \
  -H 'authorization: [Base64({Your_Server_Key}:)]' \
  -H 'content-type: application/json' \
  -d '{
    "amount": "1000.00"
  }'

Response Code

200 - Success

1
2
3
4
5
6
7
8
9
10
11
12
13
{
    "data": {
        "payment_id": "pay_123",
        "order_id": "ord_123",
        "preauthorized_amount": "1000.00",
        "account_id": "",
        "paid_amount": "1000.00",
        "status": "processing",
        "created_at": "2022-12-15T10:51:47.829636Z",
        "updated_at": "2022-12-15T16:26:25.076181Z",
        "metadata": null
    }
}