Pay Invoice API
The following endpoint creates a payment for Invoices:
/invoices/pay
Request Attributes
Following are the parameters to be sent in the request body:
bank_code
String
Mandatory
The code of the bank for which the VA needs to be created. Supported Bank Codes are: BCA
, BRI
, MANDIRI
, PERMATA
, CIMB
.
invoices
List of Objects
Mandatory
json object
Contains details of Invoices to be paid.
Hide invoices object
Field | Type | Description |
---|---|---|
idMandatory | string | Unique identifier of the Invoice to be paid. |
amountMandatory | string | Amount to be paid for the Invoice. |
Example
curl -X POST \
https://api.durianpay.id/v1/invoices/pay \
-H 'authorization: [Base64({Your_Server_Key}:)]' \
-H 'content-type: application/json' \
-d '{
"bank_code": "BCA",
"invoices": [
{
"id": "inv_0dIWbudjjf84078",
"amount": "10000.34"
},
{
"id": "inv_h73BiiJVS42949",
"amount": "12002.00"
}
]
}'
Response Code
200 - Success
1 2 3 4 5 6
{ "va_number": "5728141901634", "bank_code": "BCA", "amount": "22002.34", "response_code": "0000" }
400 - Invalid Request
401 - Unauthorized Access
404 - Not Found
422 - Unprocessable Entity
500 - Internal Server Error