Integration Overview
Send cross-border bank payouts from your IDR balance. Get a signed event for each status change of a payout.
The Global Payout API sends cross-border bank payouts. Durianpay debits your IDR balance. Then it pays the beneficiary's bank account in the destination currency.
A payout has a sender and a receiver. The beneficiary is the receiver. In a setup with customers, the customer is the sender: your end customer. In a setup without customers, your business is the sender.
A corridor is a destination country and currency, for example US / USD. Each corridor can need different fields. The statuses and the endpoints are the same for every corridor.
Sample valuesThe examples use sample data. For the current corridors, requirements, rates, fees and limits, use the API responses.
How a payout works
- Choose a corridor. Call the List Corridors API and pick a corridor from the list. Get its requirements from the Fetch Corridor Requirements API. See Preparation.
- Register the beneficiary. Create it with the Create Beneficiary API. Then add its bank account with the Create Payment Account API. In a setup with customers, also create the customer (the sender) with the Create Customer API. Durianpay screens each beneficiary and customer.
- Create a quote. The Create Quote API returns the price. The quote gives the rate (
rate) and the fixed fee (fees). It also gives the destination amount (destination) and the total IDR debit (totalDebit). The quote is valid until itsexpiresAt. The lifetime varies, so readexpiresAtin each quote. - Create the payout. Call the Create Payout API. Send the
referenceNoof the quote inquoteReferenceNo. Send thereferenceNoof the payment account inpaymentAccountReferenceNo. In a setup with customers, also sendcustomerReferenceNo. Use a uniquepartnerReferenceNofor each payout. - Durianpay sends the payout. Durianpay screens the payout and debits your IDR balance. Then it sends the payout to the receiving bank. To stop a payout before Durianpay sends it, cancel it with the Payout Action API (coming soon).
- Track the status. Durianpay sends a signed event for every status change. If an event does not come, call the Fetch Payout by ID API. See Webhooks.
HTTP 200 does not mean that the beneficiary is paidHTTP 200 on a create request means that Durianpay accepted your request. For a payout, it does not mean that the beneficiary has the funds. The result comes later, as a status change in an event.
If you need an internal approval before you pay, get it before you create the quote. A quote can expire while you wait. If you get the approval after you create the quote, create a new quote.
Payout statuses
A payout starts in processing. On the normal path, it then becomes completed.
| Status | What it means for you |
|---|---|
processing | Durianpay screens or reviews the payout, debits your balance, or sends the payout. Wait for the outcome. |
need_action | For a payout that needs an action from you: a request for information (RFI) or a requote. This feature is coming soon. |
completed | The beneficiary is paid. The payout can still become refunded if the funds come back. |
failed | The payout cannot complete. A payout that you cancel also becomes failed. The failure object gives the cause. If Durianpay debited your balance, Durianpay already returned the debit to your available balance. |
refunded | The funds came back after payment. Durianpay returns the full totalDebit, fee included, to your balance. |
failed and refunded are final statuses. A completed payout can change only to refunded.
Durianpay sends global.payout.updated when the status of a payout changes. The events for beneficiaries and customers are global.beneficiary.updated and global.customer.updated. Durianpay sends no event when you create a payout. The create response gives the first status, processing.
For your next step in each status, see Status Definition.
Resources and IDs
| Resource | What it is | Example referenceNo |
|---|---|---|
| Beneficiary | The receiver of a payout. | par_7pq3m |
| Payment account | A bank account of a beneficiary. A payout uses one payment account. | ppy_4kd9wq |
| Customer | The sender of a payout, in a setup with customers. | cus_1abc9k |
| Quote | The price of one payout. See Quote Object. | orm_2m9x4h |
| Document | A supporting file for one payout. You send the details first, then the file. | doc_4fj2k9 |
| Payout | A payment to one beneficiary. It has the same referenceNo as its quote. | orm_2m9x4h |
| ID | Set by | How to use it |
|---|---|---|
referenceNo | Durianpay | The Durianpay ID. Do not parse it. Store it and copy it exactly, with its prefix, such as orm_. |
partnerReferenceNo | You | Your own reference, 1–64 characters, on a beneficiary, customer, document or payout. Use a unique value for each payout. Use the same value again for the same beneficiary or customer. |
- If you send a create request again with the same
partnerReferenceNoand body, you get the existing resource. The response hasadditionalInfo.replayed: true. - If the body is different, the API returns
PARTNER_REFERENCE_NO_CONFLICT(4090001). See Idempotency and repeated requests. - To get a payout by your own reference, call the Fetch Payout by Reference API.
- Each ID belongs to the merchant account of your client key (
X-PARTNER-ID). For an unknown resource or a resource of another merchant account, the API returnsRESOURCE_NOT_FOUND(4040001).
Key terms
| Term | Meaning for your integration |
|---|---|
| Customer | Your end customer who sends the payout: the sender, also called the originator. A payout has a customer only in a setup with customers. |
| Beneficiary | The individual or business that receives the payout. |
| Corridor | A destination country and currency, for example US / USD. |
| Payout rail | The payment network that pays the account, for example ACH (the US Automated Clearing House). Each corridor lists its payout rails in supportedPayoutRails. |
| Beneficiary type | business or individual. You send it in beneficiaryType. The price of a quote comes from the beneficiary type. |
| Customer type | The type of your customer: individual or business. You send it in customerType when you read the requirements and when you create the customer. |
| Use case | b2b, b2c, c2b or c2c. The first letter is the sender: b for your business or a business customer, c for an individual customer. The second letter is the beneficiary: b for a business, c for an individual. You do not send it: the beneficiary type and the customer type (in a setup with customers) set it. It selects the required fields, and the corridor must support it. |
| Customer setup | A setup with customers or a setup without customers. Durianpay sets it during onboarding. It decides if a payout has a customer (customerReferenceNo). |
| Requirements | The fields that a corridor needs for the beneficiary, payment account, customer and payout. They depend on the payout rail, beneficiary type and customer type. See Preparation. |
| Screening and review | Checks that Durianpay runs on a beneficiary, customer or payout. Review is a further check. The status stays processing during both. |
| FX window | The time from the creation of the payout's quote until its expiresAt. The payout uses the rate of the quote during this time. See Payout Object. |
Where to go next
| You want to | Go to |
|---|---|
| Set up credentials, webhooks, funds and a corridor | Preparation |
| Send your first payout | Integration Steps |
| Handle events, errors and lost responses | Webhooks and Errors |
| Test outcomes in the sandbox | Testing in the Sandbox |
| Find an endpoint, an object or a status | API Reference |
Updated about 14 hours ago
