Skip to main content
A cash-out payment is a Pix that leaves one of your bank accounts: a payout, a withdrawal or any transfer to a Pix key, a BR code (the Pix copy-and-paste code) or a bank account. Every payment debits the bank_account_id you send and creates an out document that you track through webhooks or the API. All examples use the sandbox base URL https://api.sandbox.trio.com.br.

Choose a flow

V2 offers two ways to pay a Pix. Both create the same out document and return the same response; they differ in when the receiver is checked.
Coming from V1? POST /v2/out/pix/async is the direct equivalent of the V1 cash out request.

Asynchronous flow

1. Send the payment

2. Assert the expected receiver (optional)

Add counterparty when you know who should receive the money. Trio refuses the payment if the key or BR code belongs to another tax_number, or to none of the bank_accounts listed.

3. Read the response

The API returns the ID of the out document right away:
out_document_id identifies the out document; use it to track the payment. When the payment needs approval, approval_request_id carries the ID of the approval request.

Check-then-pay flow

POST /v2/out/pix processes the payment synchronously. For type key or brcode, check the destination first and send the id of the check as check_id.

1. Check the Pix key or BR code

  • entity_id (required): entity that will pay the Pix.
  • key (required): the Pix key: a CPF, a CNPJ, an email, a phone number (+5511999999999) or a random key.
The response identifies the receiver and returns the check id. For a CPF, tax_number is masked and the branch, number, digit and type of the bank account are null.
A BR code is checked the same way: send the entity_id and the copy-and-paste code as hash to POST /v2/out/pix/brcodes/check.

2. Pay with the check ID

The response has the same shape as the asynchronous one: out_document_id and, when the payment needs approval, approval_request_id.

Pay a bank account directly

A bank_account payment goes through POST /v2/out/pix and needs no prior check. Send the receiver in counterparty:

Track the payment

Whichever flow you use, the payment continues after the response. Follow its status through webhook events, or read the out document with GET /v2/documents/out/{id} using the out_document_id from the response.

Next steps

  • Pix key types: the key types V2 accepts and how they are validated.
  • List payments: list, read and search out documents.
  • Payments: boleto, utility, tax and DARF payments.