Skip to content

Create PIX Out ​

Create a PIX payout order.

Endpoint ​

POST /cashout/pix/create

Authentication ​

Merchant Credential. See Authentication.

Background ​

This API initiates a Brazilian Pix payout transaction. The merchant submits its own cashout order, amount, and payee information; currency supports 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 cashout order numbers are unique under the same merchant, for order de-duplication and subsequent queries. The merchant order number serves as the idempotency key, with an idempotency validity period of 3 months: within this period, resubmitting the same order number will not create a duplicate cashout order. Idempotency for cashin and cashout does not exclude each other; an order number submitted for cashout may be reused in cashin.

Cashout Transaction Flow ​

  • Synchronous acceptance phase: The merchant submits the payout request; Adopay performs integration checks, business validation, idempotency control, and order persistence, then 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.
mermaid
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 notifyUrl
    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
    end

Request Fields ​

FieldLocationTypeLengthRequiredDescription
X-Merchant-IdHeaderstring64YesMerchant ID, read from the request header.
X-TimestampHeaderint19YesUnix request timestamp in seconds.
X-NonceHeaderstring64YesRandom string for request anti-replay protection.
DigestHeaderstring52YesDigest of the request body. Format: SHA-256=<Base64Digest>.
AuthorizationHeaderstringVariableYesES256 request signature, where keyId is the merchant key version.
merchantOrderNoBodystring64YesMerchant order number; unique among the same merchant's cashout orders, used for order de-duplication and subsequent queries. Cashin and cashout idempotency are not mutually exclusive; cashin may reuse the same order number.
amountBodydecimal25,2YesPayment amount in BRL; must be greater than zero, with at most two decimal places.
payeeTaxNoBodystring64YesPayee tax ID; CPF is 11 digits, CNPJ is 14 digits.
payeePixKeyBodystring64YesPayee Pix Key.
notifyUrlBodystring255NoURL where the merchant receives cashout result notifications; the submitted value takes precedence, otherwise the merchant-configured URL is used.
attachBodystring128NoOpaque data passed through by the merchant; returned as-is in callback notifications or retrieval queries, invisible to the paying user.
referenceBodystring128NoDescription visible in the user's bank statement details, up to 128 characters.
displayNameBodystring128NoName to be displayed on the payment proof.

Request Header Example ​

http
Content-Type: application/json
X-Merchant-Id: 92315566000120
X-Timestamp: 1786838400
X-Nonce: 8f6e17d07f8b4fe19318d9c4dd6fc001
Digest: SHA-256=<REQUEST_BODY_SHA256_BASE64>
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 ​

json
{
  "merchantOrderNo": "CASHOUT202608160001",
  "amount": 100.25,
  "payeePixKey": "maria.oliveira@example.com",
  "notifyUrl": "https://merchant.example.com/callback/cashout",
  "attach": "merchant-data-001",
  "reference": "Supplier payment",
  "displayName": "Maria Oliveira",
  "payeeTaxNo": "12345678901"
}

Response Fields ​

The API uses a unified status, msg, data response structure. A status of 200 means the 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.

FieldTypeLengthReturnedDescription
statusint4YesResponse code
msgstring128YesCorresponds to status
dataobjectN/ANocashout acceptance result; may be absent when the request fails before entering business processing.
data.merchantOrderNostring64YesMerchant order number.
data.platOrderNostring64YesPlatform cashout order number, used for platform-side order tracking and queries.
data.amountdecimal25,2Yescashout amount submitted by the merchant.
data.receivedAmountdecimal25,2YesAmount actually credited to the payee; may be 0 before the transaction completes.
data.orderStatusstring16YesCurrent status of the cashout order; successful API acceptance does not mean this field holds a success status.

orderStatus Enum ​

Enum ValueDescriptionFinal State
PENDINGProcessing; the cashout request has been accepted and the fund processing is not yet complete.No
SUCCESScashout succeeded; the payee has been credited.Yes
FAILEDcashout failed; this cashout has ended and the funds will not be credited.Yes

Response Example ​

json
{
  "status": 200,
  "msg": "sucesso",
  "data": {
    "merchantOrderNo": "CASHOUT202608160001",
    "platOrderNo": "APS202608160000000001",
    "amount": 100.25,
    "receivedAmount": 0,
    "orderStatus": "PENDING"
  }
}