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; 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.
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 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
    end

Request Fields ​

For authentication headers, see Authentication; they are not listed in the table below.

FieldLocationTypeLengthRequiredDescription
mchOrderNoBodystring32YesMerchant 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.
keyBodystring64YesPayee 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.
amountBodydecimal(25,2)25,2YesPayment amount in BRL (Brazilian Real), at most two decimal places; range per order is 10 – 50000.
documentBodystring14NoPayee tax ID: CPF (11 digits) for individuals, CNPJ (14 digits) for companies, digits only; must be real and valid.
attachBodystring128NoOpaque data passed through by the merchant; returned as-is in callback notifications or order 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
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 ​

json
{
  "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.

FieldTypeLengthReturnedDescription
statusint4YesResponse code.
msgstring128YesMessage corresponding to status; sucesso on success.
dataobjectN/ANoCashout acceptance result; may be absent when the request fails before entering business processing.
data.mchOrderNostring32YesMerchant order number, i.e. the mchOrderNo passed by the merchant at order creation.
data.platOrderNostring64YesPlatform cashout order number, used for platform-side order tracking and queries.
data.applyTimeint19YesOrder application time (when Adopay accepted the payout request), Unix timestamp in seconds.
data.amountdecimal(25,2)25,2YesCashout amount submitted by the merchant.
data.receivedAmountdecimal(25,2)25,2YesAmount actually credited to the payee; may be 0 before the transaction completes.
data.orderStatusstring16YesCurrent status of the cashout order, see the enum below; 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; if a refund occurs later, the order status changes to REFUND.Yes
FAILEDCashout failed; this cashout has ended and the funds will not be credited.Yes
REFUNDRefunded; 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

  1. State transition: REFUND can only be reached from SUCCESS. After a refund occurs, the cashout order moves from SUCCESS to REFUND; orders in PENDING or FAILED never enter REFUND.
  2. Not necessarily a full refund: REFUND only 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 principal refundTotalAmount with the order's amount.
  3. Refund details: the principal, fee, and cumulative amounts of each refund are in the Cashout Refund Webhook; refundAmount is the principal of this refund and refundTotalAmount is the cumulative refunded principal.

Response Example ​

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