Create PIX Out
Create a PIX payout order.
Endpoint
POST/cashout/pix/createAuthentication
Merchant Credential. See Authentication.
Background
This API initiates a Brazilian Pix payout transaction. The merchant submits its own cashout order, amount, and payee information; the amount is in BRL, and the payee is ultimately paid in the local currency.
A synchronous return of status = 200 only means the payout request has been accepted by Adopay, not that the funds have reached the payee's account. The final result is determined by the asynchronous notification or the Query Cashout by Order SN result.
The merchant must ensure that mchOrderNo is unique within the scope of the same merchant's cashout orders, for order de-duplication and subsequent queries. It is also the idempotency key, with an idempotency validity period of 3 months: within this period, resubmitting the same order number does not create a duplicate cashout order, and the API returns status code 1406 (the same merchant order number was submitted more than once). Idempotency for cashin and cashout does not exclude each other; an order number submitted for cashout may be reused in cashin.
WARNING
If the request times out or returns a non-200 HTTP status, always confirm the order status with Query Cashout by Order SN; do not infer it.
Cashout Transaction Flow
- Synchronous acceptance phase: The merchant submits the payout request; Adopay verifies the signature, validates business rules and idempotency, creates the cashout order, and returns the acceptance result.
- Asynchronous disbursement phase: Adopay initiates the Pix payout instruction to the central bank BCB in the background; the funds are credited through the receiving bank, and Adopay notifies the merchant of the final result.
sequenceDiagram
autonumber
actor U as User (payee)
participant M as Merchant
participant A as Adopay
participant BCB as Central Bank BCB
participant RB as Receiving Bank
U->>M: Trigger the payout business scenario
M->>A: POST /cashout/pix/create
A->>A: Verify signature, validate business rules and idempotency, create cashout order and disbursement task
A-->>M: Return platOrderNo, orderStatus = PENDING
M-->>U: Show that the request is accepted or in progress
A->>BCB: Submit the Pix payout instruction
BCB->>RB: Initiate the Pix transfer
RB-->>U: Credit the receiving account
RB-->>BCB: Return the credit result
BCB-->>A: Notify the payout success or failure result
A->>A: Verify the result and idempotently update the order to its final state
A-->>M: POST the payout result to the callback URL
alt Merchant confirms successfully
M-->>A: Return success confirmation
M-->>U: Update the business order and display the payout result
else Merchant does not confirm successfully
A-->>M: Retry according to the notification task policy
endRequest Fields
For authentication headers, see Authentication; they are not listed in the table below.
| Field | Location | Type | Length | Required | Description |
|---|---|---|---|---|---|
mchOrderNo | Body | string | 32 | Yes | Merchant order number, generated by the merchant; only letters, digits, _ and - are allowed, up to 32 characters. Unique among the same merchant's cashout orders, used for order de-duplication and subsequent queries, and also used as the idempotency key. |
key | Body | string | 64 | Yes | Payee Pix Key (Pix account); the format depends on the type: CPF is 11 digits; CNPJ is 14 digits; EVP (random key) is in UUID format 8-4-4-4-12, lowercase letters and digits only, separated by -; PHONE is +55 followed by 11 digits; EMAIL is a standard email address. |
amount | Body | decimal(25,2) | 25,2 | Yes | Payment amount in BRL (Brazilian Real), at most two decimal places; range per order is 10 – 50000. |
document | Body | string | 14 | No | Payee tax ID: CPF (11 digits) for individuals, CNPJ (14 digits) for companies, digits only; must be real and valid. |
attach | Body | string | 128 | No | Opaque data passed through by the merchant; returned as-is in callback notifications or order queries, invisible to the paying user. |
reference | Body | string | 128 | No | Description visible in the user's bank statement details, up to 128 characters. |
displayName | Body | string | 128 | No | Name to be displayed on the payment proof. |
Request Header Example
POST /cashout/pix/create HTTP/1.1
Content-Type: application/json
X-Merchant-Id: 92315566000120
X-Timestamp: 1786838400
X-Nonce: 8f6e17d07f8b4fe19318d9c4dd6fc001
Digest: SHA-256=<Base64Digest>
Authorization: Signature keyId="v1",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="<ES256_SIGNATURE_BASE64>"Here, Digest must be computed over the raw request body actually sent, and the signature value in Authorization must be generated dynamically from the actual request path, timestamp, nonce, and digest.
Request Body Example
{
"mchOrderNo": "CASHOUT202608160001",
"key": "maria.oliveira@example.com",
"amount": 100.25,
"document": "12345678901",
"attach": "merchant-data-001",
"reference": "Supplier payment",
"displayName": "Maria Oliveira"
}Response Fields
The API uses a unified status, msg, data response structure. A status of 200 means the payout request was accepted, but does not mean the cashout transaction ultimately succeeded; the final result should be determined by orderStatus, the asynchronous notification, or the order query result. Any other value means the request failed, see Response Status for the meaning.
| Field | Type | Length | Returned | Description |
|---|---|---|---|---|
status | int | 4 | Yes | Response code. |
msg | string | 128 | Yes | Message corresponding to status; sucesso on success. |
data | object | N/A | No | Cashout acceptance result; may be absent when the request fails before entering business processing. |
data. | string | 32 | Yes | Merchant order number, i.e. the mchOrderNo passed by the merchant at order creation. |
data. | string | 64 | Yes | Platform cashout order number, used for platform-side order tracking and queries. |
data. | int | 19 | Yes | Order application time (when Adopay accepted the payout request), Unix timestamp in seconds. |
data. | decimal(25,2) | 25,2 | Yes | Cashout amount submitted by the merchant. |
data. | decimal(25,2) | 25,2 | Yes | Amount actually credited to the payee; may be 0 before the transaction completes. |
data. | string | 16 | Yes | Current status of the cashout order, see the enum below; successful API acceptance does not mean this field holds a success status. |
orderStatus Enum
| Enum Value | Description | Final State |
|---|---|---|
PENDING | Processing; the cashout request has been accepted and the fund processing is not yet complete. | No |
SUCCESS | Cashout succeeded; the payee has been credited; if a refund occurs later, the order status changes to REFUND. | Yes |
FAILED | Cashout failed; this cashout has ended and the funds will not be credited. | Yes |
REFUND | Refunded; a refund has occurred on this cashout. It can only be reached from SUCCESS, and it does not mean the order has been fully refunded; see the notes below. | Yes |
REFUND status notes
- State transition:
REFUNDcan only be reached fromSUCCESS. After a refund occurs, the cashout order moves fromSUCCESStoREFUND; orders inPENDINGorFAILEDnever enterREFUND. - Not necessarily a full refund:
REFUNDonly means that a refund has occurred on the cashout order, not that it has been fully refunded. To check whether it has been fully refunded, compare the cumulative refunded principalrefundwith the order'sTotal Amount amount. - Refund details: the principal, fee, and cumulative amounts of each refund are in the Cashout Refund Webhook;
refundAmountis the principal of this refund andrefundis the cumulative refunded principal.Total Amount
Response Example
{
"status": 200,
"msg": "sucesso",
"data": {
"mchOrderNo": "CASHOUT202608160001",
"platOrderNo": "APS202608160000000001",
"applyTime": 1786838401,
"amount": 100.25,
"receivedAmount": 0,
"orderStatus": "PENDING"
}
}