post
https://api.durianpay.id/v1.0/global/payouts
The following endpoint creates a payout from an active quote.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
2000000 does not mean that the beneficiary has the funds
2000000means that the payout exists and its status isprocessing. This call does not send an event. To follow the payout, handle the Payout Notification events, or call the Fetch Payout by ID API.
Before you call this endpoint, prepare these items:
- An active quote that no payout has used.
- A payment account that is
active. Its beneficiary must beactive. The country, currency and payout rail of the account must match the quote. The beneficiary type must also match the quote. - In a setup with customers, an
activecustomer. - A request body that you build from
payout.fieldsandpayout.documentsof the Fetch Corridor Requirements API.
The API can refuse the request. Then the API stores nothing and does not use the quote. Read additionalInfo.code:
| Cause | additionalInfo.code |
|---|---|
| The quote expired. | QUOTE_EXPIRED (4030000) |
| Another payout used the quote. | QUOTE_ALREADY_USED (4090003) |
Another payout uses a document in documents. | DOCUMENT_ALREADY_USED (4090002) |
| The payment account is inactive. | PAYMENT_ACCOUNT_INACTIVE (4030030) |
| The beneficiary cannot receive a new payout. | BENEFICIARY_NOT_ACTIVE (4030029) |
| The payout rail of the account differs from the quote. | QUOTE_RAIL_MISMATCH (4040018) |
| The country or currency of the account differs from the destination of the quote. | QUOTE_DESTINATION_MISMATCH (4040023) |
| The beneficiary type differs from the quote. | QUOTE_BENEFICIARY_TYPE_MISMATCH (4040022) |
| A new payout cannot use the customer. | CUSTOMER_NOT_ACTIVE (4030028) |
| You send a customer in a setup without customers. | CUSTOMER_NOT_ALLOWED (4030025) |
Your available balance does not cover totalDebit. | INSUFFICIENT_BALANCE (4030014) |
| A field of the beneficiary, the payment account or the customer is missing, or a required document is missing. | REQUIREMENTS_UNMET (4030015) |
Durianpay cannot accept the payout now (retriable: true). | PAYOUT_TEMPORARILY_UNAVAILABLE (4030027) |
Response Code Handling gives the next step for each code.
Notes:
- The payout gets the
referenceNoof the quote. - This call checks the beneficiary, the payment account, the customer and the documents again, with the current requirements. One
REQUIREMENTS_UNMETerror lists every missing field and document. See Fix aREQUIREMENTS_UNMETerror. - Send a document only when its status is
uploaded. If a document indocumentsis notuploaded, the API returns a validation error. If another payout uses a document indocuments, the API returnsDOCUMENT_ALREADY_USED(4090002). Upload a new document for this payout. See Document Object. - A validation error lists each field in
additionalInfo.errors. If a required payout field is missing, the code of that field isFIELD_MISSING(4000002). If a field thatpayout.fieldslists has a bad value, the code isFIELD_INVALID(4000001). - The API also returns
FIELD_INVALIDwhenpartnerReferenceNo,quoteReferenceNo,paymentAccountReferenceNo,customerReferenceNoordocumentshas the wrong JSON type. - If you send a payout field that
payout.fieldsdoes not list, the API ignores it. The create succeeds, and the API does not store the field.purposeOfTransactionis required only whenpayout.fieldssays so. - This call checks your balance, but it does not reserve the funds. See Fund your balance and Balance cut-off.
- If you send the same
partnerReferenceNoand the same request body again, the API returns the existing payout withadditionalInfo.replayed: true. With a different request body, the API returnsPARTNER_REFERENCE_NO_CONFLICT(4090001). See Idempotency and repeated requests. - After a timeout or an HTTP 5xx response, keep the same
partnerReferenceNo. Then follow Recover a Lost Response. - In the sandbox, you select a test outcome with the prefix of
partnerReferenceNo. See Testing in the Sandbox. - For the fields, the statuses, the lifecycle and the deadlines of a payout, see Payout Object.
Other body fields
- Other payout fields (As specified, Per requirements): Follow
payout.fields.
Sequence diagram: payout create
sequenceDiagram
autonumber
participant M as Merchant server
participant API as Global Payout API
participant WH as Merchant webhook endpoint
opt Check the account first
M->>API: POST /v1.0/global/account-validation
API-->>M: 200 valid, invalid or service_unavailable
end
M->>API: POST /v1.0/global/payouts with paymentAccountReferenceNo
API-->>M: 200 payout, status processing
alt Checks pass
API->>WH: global.payout.updated, status completed
else Checks fail
API->>WH: global.payout.updated, status failed
M->>API: GET the payout for its failure code
end
Note over M,API: Simplified. The payout can also fail later. See Payout lifecycle.