Authentication

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:

This page gives the rules for the Global Payout API.

🚧

Keep your secrets on your server

Keep 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:

EnvironmentHost
Sandboxhttps://api-sandbox.durianpay.id
Productionhttps://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-ID and X-EXTERNAL-ID on every call. On a call with a JSON request body, also send Content-Type: application/json.
  • X-PARTNER-ID: your SNAP client key. It must match the token.
  • CHANNEL-ID: any value that is not empty, for example 95221.
  • X-EXTERNAL-ID: send a new value on every request, also when you send the same request again. The idempotency key is partnerReferenceNo in 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 the uploadUrl authorizes that call.
  • Path to sign: sign the decoded URL path, without the query string. For example, GET /v1.0/global/payouts/reference/INV%2F2026%2001 signs 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.

InputValue
Method and pathPOST /v1.0/global/quotes
Access tokentest-access-token
Client secrettest-client-secret
X-TIMESTAMP2026-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"}
OutputValue
SHA-256 of the request bodya35da9525682084b6fd491dfd1679050382121d068c7da901722a0c9856aef33
String to signPOST:/v1.0/global/quotes:test-access-token:a35da9525682084b6fd491dfd1679050382121d068c7da901722a0c9856aef33:2026-06-10T10:16:00+07:00
X-SIGNATUREX++eR1JbtFgYL1LH9SdediDs7JJ9HH39LVJr1/I+S4Ks4166JoodpjhtlBW+D2asrWBJ6qYp+k0KUk11lzy7fg==

A call with no request body, with the same token, client secret and timestamp:

Input or outputValue
Method and pathGET /v1.0/global/payouts/orm_2m9x4h
String to signGET:/v1.0/global/payouts/orm_2m9x4h:test-access-token::2026-06-10T10:16:00+07:00
X-SIGNATUREGREJqXr3sGNrlLxE2FYgiSPEuxxH3VDNrNdP5MBiXzlb0XX3wXjeKeWRuRV9dryEG4NCGGKj8SFVS8uN0rIZug==

Token errors

CodeMeaningYour next step
4010000A 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.
4007300The 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:

CodeMeaningYour next step
4000002A required SNAP header is missing.Add the header. See Rules for each call.
4000000The request body is not valid JSON, or it is not a JSON object.Send a JSON object as the request body.
4010001The 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.
4010000The 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.
4030018Your merchant account is inactive.Contact Durianpay support.
4030005Your 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.