The Global Payout API uses Durianpay SNAP authentication. This page gives the rules for the token and for the signature of each call.
The Global Payout API uses the same SNAP authentication as the other Durianpay SNAP APIs. Set up your credentials with Preparation: your client key, your client secret and your RSA key pair. Then you need:
- the access token: the request to Generate Access Token (B2B) (
POST /v1.0/access-token/b2b), with the headersX-CLIENT-KEY,X-TIMESTAMPandX-SIGNATUREand the body fieldgrantType. For an example, see Step 1 of Integration Steps; - the HMAC signature of each call. See Rules for each call.
This page gives the rules for the Global Payout API.
Keep your secrets on your serverKeep the RSA private key and the client secret on your server. Use the SNAP credentials of the environment that you call.
Hosts
Send the token request to the same host as the other calls of the environment:
| Environment | Host |
|---|---|
| Sandbox | https://api-sandbox.durianpay.id |
| Production | https://api.durianpay.id |
See Environments in the Introduction.
Rules for each call
- Headers: send
Authorization(Bearer <accessToken>),X-PARTNER-ID,X-TIMESTAMP,X-SIGNATURE,CHANNEL-IDandX-EXTERNAL-IDon every call. On a call with a JSON request body, also sendContent-Type: application/json. X-PARTNER-ID: your SNAP client key. It must match the token.CHANNEL-ID: any value that is not empty, for example95221.X-EXTERNAL-ID: send a new value on every request, also when you send the same request again. The idempotency key ispartnerReferenceNoin the request body, not this header. See Handling Errors.- File upload: the file upload to an
uploadUrl(step 2 of the Upload Document API) has no token and no signature. The token in theuploadUrlauthorizes that call. - Path to sign: sign the decoded URL path, without the query string. For example,
GET /v1.0/global/payouts/reference/INV%2F2026%2001signs the path/v1.0/global/payouts/reference/INV/2026 01. - Request body: hash the minified JSON body, and send these same bytes as the request body. For a call with no request body, the hash part of the string to sign is empty.
Test vectors
Check your signature code with these synthetic inputs. The token and the client secret are for this example only.
| Input | Value |
|---|---|
| Method and path | POST /v1.0/global/quotes |
| Access token | test-access-token |
| Client secret | test-client-secret |
X-TIMESTAMP | 2026-06-10T10:16:00+07:00 |
| Request body, minified | {"amountMode":"source_amount","amount":{"value":"160000000.00","currency":"IDR"},"destinationCountry":"US","destinationCurrency":"USD","payoutRail":"ACH","beneficiaryType":"business"} |
| Output | Value |
|---|---|
| SHA-256 of the request body | a35da9525682084b6fd491dfd1679050382121d068c7da901722a0c9856aef33 |
| String to sign | POST:/v1.0/global/quotes:test-access-token:a35da9525682084b6fd491dfd1679050382121d068c7da901722a0c9856aef33:2026-06-10T10:16:00+07:00 |
X-SIGNATURE | X++eR1JbtFgYL1LH9SdediDs7JJ9HH39LVJr1/I+S4Ks4166JoodpjhtlBW+D2asrWBJ6qYp+k0KUk11lzy7fg== |
A call with no request body, with the same token, client secret and timestamp:
| Input or output | Value |
|---|---|
| Method and path | GET /v1.0/global/payouts/orm_2m9x4h |
| String to sign | GET:/v1.0/global/payouts/orm_2m9x4h:test-access-token::2026-06-10T10:16:00+07:00 |
X-SIGNATURE | GREJqXr3sGNrlLxE2FYgiSPEuxxH3VDNrNdP5MBiXzlb0XX3wXjeKeWRuRV9dryEG4NCGGKj8SFVS8uN0rIZug== |
Token errors
| Code | Meaning | Your next step |
|---|---|---|
4010000 | A header is missing, X-TIMESTAMP is not RFC 3339, the client key is unknown, or the signature is wrong. | Use the client key from the Durianpay dashboard for this environment. Check the headers, the X-TIMESTAMP format and the string that you signed. |
4007300 | The request body is not valid JSON, or grantType is empty. | Correct the request body of the token request. |
The token request uses the service code 73 (digits 4 and 5 of the response code), for example 2007300. All other calls use the service code 00.
Authentication errors
These errors can come from any call:
| Code | Meaning | Your next step |
|---|---|---|
4000002 | A required SNAP header is missing. | Add the header. See Rules for each call. |
4000000 | The request body is not valid JSON, or it is not a JSON object. | Send a JSON object as the request body. |
4010001 | The token is wrong or expired, or it does not match the client key. | Get a new access token with the client key that you send in X-PARTNER-ID. Then send the call again. |
4010000 | The signature is wrong, or the client key in X-PARTNER-ID is unknown. | Use the client key from the Durianpay dashboard for this environment. Check the string that you signed. See Rules for each call. |
4030018 | Your merchant account is inactive. | Contact Durianpay support. |
4030005 | Your merchant account is suspended. | Contact Durianpay support. |
In an authentication error, additionalInfo has only trace_id. The response for an unknown client key has no additionalInfo. A 4000000 response can also have no additionalInfo. Response Code Handling gives your next step for each code.
If Durianpay has not enabled the Global Payout API feature for your merchant account, the API refuses the call with FEATURE_NOT_ENABLED (4030001). Contact Durianpay support. See Introduction.
