Skip to main content

Cancel Payment API

The following endpoint cancels a single Payment

/payments/:id/cancel

Path parameters#

Fieldis required?Description
idmandatoryinteger Unique identifier of the Payment to be retrieved

Example#

curl -u <YOUR_SECRET_KEY> \
-X GET https://api.durianpay.id/v1/payments/pay_B14sdfwAdmmSDF24a/cancel \
-H "content-type: application/json"'

Response#

{
"data": {
"id": "pay_ohXLNm2fPw6868",
"status": "failed",
"order_id": "ord_Dg0Dz9wwKP1602",
"created_at": "2020-11-19T22:09:48Z",
"updated_at": "2020-11-26T20:02:24.561169Z"
}
}