Preparation
Set up your environment, credentials, webhook URLs and IDR balance. Then choose a corridor and read its requirements.
Do these steps before your first payout. Durianpay sets up some items for your merchant account during onboarding. The sandbox and production have different hosts, credentials and webhook URLs. Everything else is the same, so test in the sandbox first.
Environments
| Environment | Host | API prefix | Token endpoint |
|---|---|---|---|
| Production | https://api.durianpay.id | /v1.0/global | POST /v1.0/access-token/b2b |
| Sandbox | https://api-sandbox.durianpay.id | /v1.0/global | POST /v1.0/access-token/b2b |
- The token endpoint is on the same host as the API. Use the SNAP credentials of the environment that you call.
- The paths in these docs include the full prefix. To get the URL, add the path to the host:
https://api.durianpay.id/v1.0/global/payouts. - Response codes have 7 digits, for example
4030001. See Response code.
In the sandbox, every Global Payout endpoint works with simulated funds. Authentication and the events work as in production. See Testing in the Sandbox.
What Durianpay sets up for you
| Item | What it means for you |
|---|---|
| Global Payout API feature | Durianpay enables it for your merchant account. While it is disabled, every Global Payout endpoint (/v1.0/global/...) returns FEATURE_NOT_ENABLED (4030001). |
| Customer setup | Durianpay sets a setup with customers or a setup without customers. It decides if your payouts have a customer (customerReferenceNo). You never send this setting. |
| IP allowlist | If your merchant account has an IP allowlist, call the API from an IP on the list. See IP Whitelisting. |
| Balance access | To read your balance from your own system, you also need the Disbursement and Balance features. Arrange this access during onboarding. |
While the Global Payout API feature is disabled, the token endpoint still works. Existing payouts and webhook deliveries also continue. Use additionalInfo.code to know which error you got. See Reading an error response.
A customer is your end customer who sends the payout (the sender). The beneficiary receives the payout. See Step 4: Register the customer.
Step 1: Set up your SNAP credentials
The Global Payout API uses SNAP authentication. SNAP (Standar Nasional Open API Pembayaran) is the Bank Indonesia standard for payment APIs. If you already use another Durianpay SNAP API, you can use the same credentials. Do these steps for each environment:
-
Get your SNAP client key and client secret in the Durianpay dashboard, under Settings → API Key.
-
Make your RSA key pair:
openssl genrsa -out rsa_private_key.pem 2048 openssl rsa -in rsa_private_key.pem -out rsa_public_key.pem -pubout -
Upload your RSA public key (
.pem) in the dashboard, under Settings → API Key. Use the button Upload Public Key. -
Download the Durianpay public key in the dashboard, under Settings → API Key. You need it to verify webhooks.
Sandbox and production have separate dashboards and different keys. Make a different key pair for each environment. Keep your RSA private key and your client secret on your server. For the access token and the signature of each call, see Authentication. It also has test values for your signature code.
Step 2: Register your webhook URLs
Durianpay sends signed events to your HTTPS URLs. Register the URLs in the Durianpay dashboard, under Settings → Webhooks. The API has no endpoint to manage them.
The event types are global.payout.updated, global.beneficiary.updated and global.customer.updated. Register a different URL for each event type that your flows need. The event body does not contain the event type, so the URL tells you the type.
- Sandbox and production have separate dashboards and separate URLs.
- Verify each event with the Durianpay public key of the same environment.
- An event can arrive more than one time.
For the event body, the signature check and the retries, see Webhooks.
Step 3: Fund your balance
Payouts debit your IDR balance. Keep enough available IDR balance for your payouts.
In production, get the instructions for an IDR top-up by virtual account in the Durianpay dashboard. Send the funds as the instructions tell you. Then wait until the funds show in your available balance.
Durianpay checks your balance two timesWhen you create the payout, the API checks that your available balance covers the
totalDebitof the quote. If it does not, the API returnsINSUFFICIENT_BALANCE(4030014).The create request does not reserve the funds. The debit comes later, while the payout is
processing. If another payment uses the funds first, the status of the payout becomesfailed. The failure code isINSUFFICIENT_BALANCE, and no money moved. Add funds, then create a new payout.
To read your production balance from your own system, call GET /v1/disbursements/topup/balance. This endpoint of the Durianpay Disbursement API reads the same IDR balance. It needs the balance access from the table above. It does not use the SNAP headers of the Global Payout API. For its authentication, see the Durianpay API reference. Use it also to check that the debit of a failed payout came back. You can check the funds of a refunded payout the same way.
Step 4: Choose a corridor
A corridor is a destination country and currency, for example US / USD. Each corridor lists its payout rails. A payout rail is the payment network that pays the account, for example ACH (the US Automated Clearing House).
You can send payouts only on a corridor in the corridor list. The list is the same for every merchant account. Durianpay can add or remove a corridor, and no event tells you about it. So always get the list from the List Corridors API (GET /v1.0/global/corridors). Then choose a corridor, one of its payout rails and a beneficiary type (business or individual).
{
"responseCode": "2000000",
"responseMessage": "Successful",
"data": [
{
"country": "US",
"currency": "USD",
"supportedPayoutRails": [
{
"payoutRail": "ACH",
"settlementTime": "t_plus_1",
"beneficiaryTypes": [
{
"type": "business",
"minAmount": {
"value": "10.00",
"currency": "USD"
},
"maxAmount": {
"value": "30000.00",
"currency": "USD"
}
},
{
"type": "individual",
"minAmount": {
"value": "10.00",
"currency": "USD"
},
"maxAmount": {
"value": "6000.00",
"currency": "USD"
}
}
]
}
]
}
],
"hasMore": false
}The response is paginated with cursor and limit. See Pagination. The examples on this page use the sample corridor US / USD with the payout rail ACH. Their limits and values are samples.
Each item of supportedPayoutRails is one payout rail, with its settlementTime (see Settlement times) and its beneficiaryTypes. Each beneficiary type has its own minAmount and maxAmount: the limits for one payout, in the destination currency. When there is no minimum, minAmount is not in the response. When there is no maximum, maxAmount is not in the response.
These rules apply:
- A payout rail of one corridor is not always available on another corridor.
- The limits apply to the destination amount. With
amountModesource_amount, they apply to the destination amount that the quote calculates. - If the destination amount is outside the limits, the Create Quote API returns
AMOUNT_BELOW_MINIMUM(4040013) orAMOUNT_ABOVE_MAXIMUM(4030002). - For a corridor that is not in the list, the API returns
CORRIDOR_UNAVAILABLE(4030024). - Read the requirements only for a beneficiary type that the payout rail lists. Otherwise, the API returns
USE_CASE_NOT_SUPPORTED(4050002). - When Durianpay removes a corridor, the status of its payouts can become
failedwith the failure codeCORRIDOR_SUSPENDED. You then getglobal.payout.updatedwith the statusfailed.
To see the exchange rate before you create a quote, see Preview the rate (optional).
Settlement times
settlementTime is a fixed API value. Use the value, for example t_plus_1, in your code. Do not store or compare a display text.
settlementTime | Expected delivery |
|---|---|
real_time | In real time, after Durianpay sends the payout. |
t_plus_0 | On the same day that Durianpay sends the payout. |
t_plus_1 | 1 day after Durianpay sends the payout. |
t_plus_2 | 2 days after Durianpay sends the payout. |
t_plus_5 | 5 days after Durianpay sends the payout. |
Step 5: Read the corridor requirements
The requirements are the fields that the beneficiary, the payment account, the customer and the payout need. They depend on the corridor, the payout rail and the beneficiary type. In a setup with customers, they also depend on the customer type (customerType: individual or business).
The beneficiary type and the customer type set the 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. You do not send the use case. See Key terms.
Call the Fetch Corridor Requirements API (GET /v1.0/global/corridors/{country}/{currency}/requirements). One response has the fields for the beneficiary, the payment account, the customer and the payout.
| Parameter | Location | Required | Description |
|---|---|---|---|
country | Path | Yes | The destination country. |
currency | Path | Yes | The destination currency. With country, it selects the corridor. |
payoutRail | Query | Yes, if the corridor has more than one payout rail | A payoutRail from the corridor's supportedPayoutRails. When the corridor has one payout rail, the API selects it and returns it. |
beneficiaryType | Query | Yes | individual or business: the type of the beneficiary (the receiver). |
customerType | Query | No | individual or business: the type of your customer (the sender). Send it only in a setup with customers. |
In a setup with customers, sendcustomerTypeIf the request has no
customerType, the response has nocustomer. So you do not see the customer fields. The API still checks them when you create the payout. If a customer field is missing, the Create Payout API returnsREQUIREMENTS_UNMET(4030015).
A create call does not check all the requirements. Base fields are the request body fields on the API Reference page of the endpoint. When you create a beneficiary, the API checks the base fields and the value of each requirement field that you send. It does not refuse a missing requirement field. When you create a customer, the API checks only the base fields. When you create a payment account, the API checks only the account fields. Only the Create Payout API checks all the requirements, also the documents. See When the API checks the requirements and Fix a REQUIREMENTS_UNMET error.
Read the requirements again when you change the payout rail, the beneficiary type or the customer type. They can need other fields. The requirements can also change, and no event tells you about a change. So also read them again when a create call returns FIELD_MISSING or FIELD_INVALID.
| Part of the response | Where you send the values |
|---|---|
payoutRail | In account validation, the payment account and the quote. |
beneficiaryType | In the beneficiary and the quote. |
customerType | When you create the customer. It is in the response only when the request has it. |
beneficiary.fields | At the top level of the request body when you create the beneficiary. |
paymentAccount.fields | In accountDetails, when you create the payment account and when you validate the account. |
customer.fields | At the top level of the request body when you create the customer. |
payout.fields | At the top level of the request body when you create the payout. That request body has no payout object. |
payout.documents | The document types that the payout accepts. required: true means that the payout needs the document. required: false means that you can send it. An empty array means that the payout takes no document. |
When you create the payout, the API returns FIELD_MISSING if a required payout field is missing. It ignores a field that is not in payout.fields, and does not store it. The Fetch Corridor Requirements API page lists the errors of this call.
This example is for a setup with customers, a business customer and a business beneficiary (use case b2b):
GET /v1.0/global/corridors/US/USD/requirements?payoutRail=ACH&beneficiaryType=business&customerType=business{
"responseCode": "2000000",
"responseMessage": "Successful",
"country": "US",
"currency": "USD",
"payoutRail": "ACH",
"settlementTime": "t_plus_1",
"beneficiaryType": "business",
"customerType": "business",
"beneficiary": {
"fields": [
{
"key": "businessName",
"type": "string",
"required": true,
"pattern": "^[a-zA-Z0-9]([a-zA-Z0-9 &.,'@()$]{0,173}[a-zA-Z0-9])?$"
},
{
"key": "address",
"type": "object",
"required": true,
"fields": [
{
"key": "country",
"type": "string",
"required": true,
"pattern": "^[A-Z]{2}$"
}
]
}
]
},
"paymentAccount": {
"fields": [
{
"key": "accountNumber",
"type": "string",
"required": true,
"pattern": "^.{1,34}$",
"maxLength": 34
},
{
"key": "bankCode",
"type": "string",
"required": true
},
{
"key": "accountHolderName",
"type": "string",
"required": true
}
]
},
"customer": {
"fields": [
{
"key": "businessName",
"type": "string",
"required": true,
"pattern": "^[a-zA-Z0-9]([a-zA-Z0-9 &.,'@()$]{0,173}[a-zA-Z0-9])?$"
},
{
"key": "address",
"type": "object",
"required": true,
"fields": [
{
"key": "country",
"type": "string",
"required": true,
"pattern": "^[A-Z]{2}$"
}
]
},
{
"key": "typeOfBusiness",
"type": "enum",
"required": true,
"enumType": "type_of_business"
},
{
"key": "sourceOfIncome",
"type": "enum",
"required": true,
"enumType": "source_of_income"
},
{
"key": "associates",
"type": "array",
"required": true,
"items": {
"type": "object",
"fields": [
{
"key": "executiveEcrn",
"type": "string",
"required": true
},
{
"key": "fullName",
"type": "string",
"required": true
},
{
"key": "designation",
"type": "string",
"required": true
},
{
"key": "nationality",
"type": "string",
"required": true,
"pattern": "^[A-Z]{2}$"
},
{
"key": "mobileNumber",
"type": "string",
"required": true,
"pattern": "^.{1,20}$",
"maxLength": 20
},
{
"key": "dateOfBirth",
"type": "date",
"required": true
},
{
"key": "customerType",
"type": "enum",
"required": true,
"enumType": "customer_type"
}
]
}
}
]
},
"payout": {
"fields": [
{
"key": "purposeOfTransaction",
"type": "enum",
"required": true,
"enumType": "purpose_of_transaction"
},
{
"key": "relationship",
"type": "enum",
"required": false,
"enumType": "relationship"
}
],
"documents": [
{
"documentType": "COMMERCIAL_INVOICE",
"required": false
},
{
"documentType": "PURPOSE_EVIDENCE",
"required": false
}
]
},
"version": "2026-06-01"
}How to read a field definition
Each field definition has key, type and required. The definitions use the same nesting as the request body. In the example above, the object address has the country definition in its fields. The array associates has the definition of each entry in items.
| Property | How to read it |
|---|---|
key | The field name inside its object. A key is never a dotted path: the key is country, not address.country. |
required | true: the field is required at its level. false: you can omit it. If you send an optional object, also send its required child fields. |
type | string, number, date, enum, object or array. Amounts use the {value, currency} format. |
fields | The child fields of an object. |
items | The entries of an array. An object entry has type: object and its own fields. |
pattern, minLength, maxLength | String rules. They are in the definition only when the corridor adds a string rule. The base field rules of the endpoint always apply. |
enumType | The enum type of the field. Get its codes with the Fetch Enum Codes API, and send the code. |
The rules of items do not always apply to every entry of the array. For associates, the corridor fields apply only to the entries whose titles include ubo (ultimate beneficial owner). titles is a base field of the customer, so the example does not show it. See Step 4: Register the customer.
Map the fields and enums
Do these steps for each corridor, payout rail, beneficiary type and customer type that you offer:
- Read the requirements, as above.
- Collect every
enumTypein the field definitions, also in nestedfieldsanditems. Adddocument_typewhenpayout.documentsis not empty. - For each enum type, call the Fetch Enum Codes API one time. Keep the codes in your system.
- Store each field under its
key, with the nesting of the definitions. For an enum, store and send thecode, not thename.
This Python function collects the enum types of one requirements response:
def enum_types(requirements):
found = set()
def walk(fields):
for field in fields:
if field.get("enumType"):
found.add(field["enumType"])
walk(field.get("fields", []))
items = field.get("items") or {}
if items.get("enumType"):
found.add(items["enumType"])
walk(items.get("fields", []))
for group in ("beneficiary", "paymentAccount", "customer", "payout"):
walk((requirements.get(group) or {}).get("fields", []))
if (requirements.get("payout") or {}).get("documents"):
found.add("document_type")
return sorted(found)For the example above, it returns customer_type, document_type, purpose_of_transaction, relationship, source_of_income and type_of_business.
When the requirements of a corridor change, do these steps again. A change can add a field with a new enum type.
To design your database, use the Field list. It gives each field that you send, with its type and enum type. All enum types lists every enum type.
Read the enum codes
Call GET /v1.0/global/enum/{type} with an enumType from the requirements.
GET /v1.0/global/enum/purpose_of_transaction{
"responseCode": "2000000",
"responseMessage": "Successful",
"data": [
{
"code": "OTHERS",
"name": "Others"
},
{
"code": "SALARY",
"name": "Salary"
}
]
}- Send the
code, not thename, in your requests. - The response has every code of the type, with no pagination. The codes above are samples.
- If you send an unknown enum type, the API returns
RESOURCE_NOT_FOUND(4040001).
Next steps
- Send your first payout: Integration Steps.
- Handle the events and the errors: Webhooks and Errors.
- Test the outcomes of a payout: Testing in the Sandbox.
Updated about 14 hours ago
