Dark Mode

Submit Disbursement API


The following endpoint submit a disbursement:

/disbursements/submit

Run in Postman

As per Bank of Indonesia's regulation, starting from July 2024, we'll be stop supporting this version of the API. Please use the SNAP version instead.

Request Header Attributes

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

idempotency_key

String
Mandatory

The idempotency key used to submit the disbursement batch. It will be used to prevent accidentally creating the same disbursement more than once.

To know the difference between `X-Idempotency-Key` and `idempotency_key`, please visit the Implementation Guide here.

X-Idempotency-Key

String
Mandatory

The idempotency key used to submit the disbursement request. It will be used to prevent accidentally creating the same disbursement more than once.

  • Idempotency key is mandatory for each disbursement request. This ensures disbursement requests won't be created more than once. Please see more detail on Implementation Guide.

Path Attributes

force_disburse

Boolean
Optional

If this parameter is true then the batch will be validated and disbursed. In this case, approve API doesn't need to be called. Default value: true

Request Body Attributes

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

name

String
Optional

The name given for the disbursement batch to be submitted.

description

String
Optional

The description for the disbursement batch.

items

json object
Mandatory

Detail of transactions to be disbursed in a batch, should contain at least 1 transaction

Hide items object

FieldTypeDescription

account_owner_nameMandatory

string

The name of the bank account holder.

bank_codeMandatory

string

The bank code of the account.

amountMandatory

string

The amount of money to be disbursed.

account_numberMandatory

string

The account number of the recipient.

email_recipientOptional

string

The email of the recipient.

phone_numberOptional

string

The phone number of the recipient.

notesOptional

string

The notes for the disbursement if any.

sender_informationOptional

json object

The details of disbursement sender. This will be mandatory in case of disbursement on behalf of another party.

sender_information

json object
Optional

Part of items object. The details of disbursement sender. This will be mandatory in case of disbursement on behalf of another party.

Hide sender_information object

FieldTypeDescription

nameMandatory

string

The name of the sender

For a name to be accepted, following rules should be adhered
  • Name should have minimum length 2 and maximum length 50
  • Should start with alphabet
  • Should not contain any character other than alphabets, spaces and the special charcacters , . ' -

countryMandatory

string

The country of the sender. Two letter country code as per ISO-3166 alpha-2 standard

Refer here for ISO-3166 alpha-2 country codes. ISO-3166 alpha-2 country code

sender_accountMandatory

json object

The account details of sender

sender_identityMandatory

json object

The identity details of sender

jobOptional

string

The job of the sender

Valid job types are
  • company
  • entrepreneur
  • private_employee
  • government_employee
  • foundation_employee -> People who work at foundation / non profit organization as an employee
  • housewife
  • others -> For job that's not categorized in the option above

date_of_birthOptional

string

The date of birth of the sender in YYYY-MM-DD format

place_of_birthOptional

string

The place of birth of the sender

addressOptional

string

The address of the sender

Note: Either of sender_account or sender_identity is required, but both can be included if available.

sender_account

json object
Mandatory

Part of sender_information object. The details of sender account

Hide sender_account object

FieldTypeDescription

bank_identifierMandatory

string

Valid ATM Code or Swift Code for sender bank

Valid ATM codes and Swift codes can be fetched using the Fetch banks API

account_numberMandatory

string

Account Number of sender

sender_identity

json object
Mandatory

Part of sender_information object. The details of sender idenity

Hide sender_identity object

FieldTypeDescription

identity_typeMandatory

string

Type of sender identity

Valid values are
  • company_id -> to provide Company Identification Number/NIB
  • national_id -> to provide National Identity Card number
  • passport -> to provide Passport Number

identity_numberMandatory

string

Indentity Number of chosen identity type

Valid values for company_id and national_id are strings with numeric characters. Example "1234567890"

Valid values for passport are strings with alphanumeric characters. Example "ABC1234DEF".

Example
curl -u [Base64({Your_Server_Key}:)] \
-X POST https://api.durianpay.id/v1/disbursements/submit \
-H "content-type: application/json" \
-H "idempotency_key: <YOUR_IDEMPOTENCY_KEY>" \
-H "X-Idempotency-Key: <YOUR_X_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",
      "sender_information": {
        "name": "Sender Name",
        "country": "ID",
        "sender_account": {
            "bank_identifier": "014",
            "account_number": "1234567"
        },
        "sender_identity": {
            "identity_type": "company_id",
            "identity_number": "1234566789"
        },
        "job": "company",
        "date_of_birth": "1990-01-01",
        "address": "jakarta",
        "place_of_birth": "jakarta indonesia"
      }
    },
    {
      "account_owner_name": "Jack",
      "bank_code": "bca",
      "amount": "10000",
      "account_number": "235464",
      "email_recipient": "jack@nomail.com",
      "phone_number": "85609873209",
      "notes": "salary",
      "sender_information": {
        "name": "Sender Name",
        "country": "ID",
        "sender_account": {
            "bank_identifier": "014",
            "account_number": "1234567"
        },
        "sender_identity": {
            "identity_type": "company_id",
            "identity_number": "1234566789"
        },
        "job": "company",
        "date_of_birth": "1990-01-01",
        "address": "jakarta",
        "place_of_birth": "jakarta indonesia"
      }
    }
  ]
}'

Response Code

200 - Success

1
2
3
4
5
6
7
8
9
10
11
{
    "data": {
        "id": "dis_123",
        "name": "sample disbursement",
        "idempotency_key": "123xxx",
        "total_amount": "20000",
        "total_disbursements": 2,
        "description": "this is a sample disbursement",
        "is_split": false
    }
}

202 - Request Accepted

400 - Invalid Request (Amount Empty)

400 - Invalid Request (Invalid Account Number)

400 - Invalid Request (Invalid Account Owner Name)

400 - Invalid Request (Invalid Bank Code)

400 - Invalid Request (Amount - Negative or Zero)

400 - Invalid Request (Sender information not present)

400 - Invalid Request (Name empty)

400 - Invalid Request (Invalid country)

400 - Invalid Request (Missing Sender Account and Sender Identity)

400 - Invalid Request (Invalid Sender Bank Indentifier)

400 - Invalid Request (Invalid Sender Account Number)

400 - Invalid Request (Invalid Sender Identity Type)

400 - Invalid Request (Invalid Sender Identity Number)

400 - Invalid Request (Invalid Sender Job)

400 - Invalid Request (Invalid Sender Date of Birth)

400 - Invalid Request (Invalid Sender Place of Birth)

400 - Invalid Request (Invalid Sender Address)

401 - Unauthorized Access

403 - Forbidden

409 - Conflict

500 - Internal Server Error

504 - Gateway Timeout