Lewati ke konten utama

Import bank disbursements from CSV

Use this endpoint to create multiple bank disbursements in one atomic request. It is available to both FlyPay direct merchants and FlyPay merchants using the API domain associated with their credentials.

POST /v1/disbursements/import
Content-Type: multipart/form-data
X-API-Key: your-api-key
Form fieldRequiredDescription
fileYesA .csv file, up to 10 MB and 1,000 data rows
idempotency_prefixYesA stable, unique batch key, up to 230 characters

CSV format​

Use these header names in this order:

Bank Code,Account Number,Account Name,Amount
BCA,0123456789,PT Example Indonesia,500000
014,0987654321,Example Supplier,1250000
ColumnDescription
Bank CodeEnabled bank short code, such as BCA, or the bank's RTOL code, such as 014
Account NumberBeneficiary account number. Keep this column as text so leading zeroes are preserved.
Account NameBeneficiary name
AmountPositive whole-Rupiah integer; do not multiply by 100

The older snake-case header bank_short_code,account_number,account_name,amount remains accepted for backward compatibility, but new integrations should use the standard headers above.

Request example​

For FlyPay merchants:

curl -X POST https://api.flypay.asia/v1/disbursements/import \
-H "X-API-Key: your-api-key" \
-F "idempotency_prefix=PAYROLL-2026-11-23" \
-F "file=@disbursements.csv;type=text/csv"

FlyPay merchants use the same request with https://api.flypay.asia.

Atomic validation and retries​

The API validates every row, the merchant's per-transaction and daily limits, fees, bank codes, and available wallet balance before creating anything. If one row is invalid, the response is 422 and no row is created.

Each data row receives an idempotency key derived from idempotency_prefix and its CSV row number. Retrying the same file with the same prefix is safe. Do not reuse a prefix for a different file or change row order during a retry.

Successful response:

{
"success": true,
"data": {
"created": 2,
"existing": 0,
"failed": 0,
"errors": [],
"items": [
{"row": 2, "ref_code": "DSB-261123120000-ABCD"},
{"row": 3, "ref_code": "DSB-261123120000-EFGH"}
]
}
}

An accepted batch is queued asynchronously. Track each returned ref_code with the disbursement query endpoint or status webhooks.