Skip to main content

Submit Disbursement API

Submit a disbursement#

The following endpoint submit a disbursement:

/disbursements/submit

Path parameters#

Fieldis required?Description
force_disburseoptionalbool If this parameter is true then the batch will be validated and disbursed. In this case, approve API doesn't need to be called.

Request parameters#

Following are the parameters to be sent in the request body:

Fieldis required?Description
namemandatorystring The name given for the disbursement batch to be submitted.
descriptionmandatorystring The description for the disbursement batch.
account_owner_namemandatorystring The name of the bank account holder.
bank_codemandatorystring The bank code of the account.
amountmandatorystring The amount of money to be disbursed.
account_numbermandatorystring The account number of the recipient.
email_recipientmandatorystring The email of the recipient.
phone_numbermandatorystring The phone number of the recipient.
notesoptionalstring The notes for the disbursement if any.

Following are the parameters to be sent in the request header:

Fieldis required?Description
idempotency_keymandatorystring The idempotency key used to submit the disbursement. It will be used to prevent accidentally creating the same disbursement more than once.

Example#

curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/disbursements/submit \
-H "content-type: application/json" \
-H "idempotency_key: <YOUR_IDEMPOTENCY_KEY>" \
-d '{
"name": "sample disbursement",
"description": "this is a sample disbursement",
"items": [{
"account_owner_name": "Jane Doe",
"bank_code": "bca",
"amount": "10000",
"account_number": "8422647",
"email_recipient": "jane_doe@nomail.com",
"phone_number": "85722173217",
"notes": "salary"
},
{
"account_owner_name": "Jack",
"bank_code": "bca",
"amount": "10000",
"account_number": "235464",
"email_recipient": "jack@nomail.com",
"phone_number": "85609873209",
"notes": "salary"
}]
}'

Response#

{
"data": {
"id": "dis_LjxhDKq8Am3427",
"name": "test disb",
"total_amount": "20000.00",
"total_disbursements": 2,
"description": "description"
}
}