Send PIX Payment (Cash-Out)
POST /api/pix/cash-out
POST https://<api-host>/api/pix/cash-outRequires a Bearer token in the Authorization header. See Generate Token to obtain one.
Sends a PIX payment to a destination PIX key. The transaction is created with status PENDING and the final result is notified via webhook or can be queried via polling.
Authentication
Requires a Bearer token in the Authorization header.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
value | number | Yes | Amount in BRL (up to 2 decimal places). Minimum: 0.01 |
externalId | string | Yes | Unique external identifier per account (max 50 characters) |
description | string | No | Transaction description (max 140 chars) |
details | object | Yes | Destination PIX key information |
details.key | string | Yes | Destination PIX key (see formats in the table below) |
details.keyType | string | Yes | Key type: DOCUMENT, EMAIL, PHONE, RANDOM. Required because the API does not query DICT |
details.name | string | No | Key holder name (max 100 characters). Some settlement providers require it: we recommend always sending it |
details.document | string | No | Valid CPF (11 digits) or CNPJ (14 digits) of the key holder, digits only. Some settlement providers require it: we recommend always sending it. The API validates format only; see Ownership verification by settlement provider |
details.checkPixKeyWithDocument | boolean | No | If true, requests a check that the key belongs to the CPF/CNPJ in details.document, rejecting the payment on mismatch. Requires details.document (without it, the API responds 400). Only takes effect on settlement providers that support the check. Default: false |
Accepted formats for details.key
keyType | Format | Example |
|---|---|---|
DOCUMENT | CPF: 11 digits / CNPJ: 14 digits (numbers only) | 12345678909, 12345678000195 |
EMAIL | Valid email address | usuario@exemplo.com |
PHONE | Area code + number (10-11 digits, without country code +55) | 11999999999 |
RANDOM | UUID (with or without hyphens) | a1b2c3d4-e5f6-4890-abcd-ef1234567890 |
The payment is always addressed by the PIX key (details.key). The Gateways API validates the format of details.document, but does not compare it with details.key and does not query DICT before sending. Checking it against the actual key holder depends on your account's settlement provider (and, on some providers, on details.checkPixKeyWithDocument). Without that check, a mismatched details.document does not block the payment: the amount is credited to the key owner. See Ownership verification by settlement provider.
Request Examples
Payment by CPF — the most common case. The details.key and details.document must be the same (both are the CPF). The API does not verify this equality: enforce it on your side before sending.
{
"value": 150.00,
"externalId": "PAG-2024-0001",
"description": "Pagamento freelancer - Janeiro/2024",
"details": {
"key": "12345678909",
"keyType": "DOCUMENT",
"name": "Ana Costa",
"document": "12345678909"
}
}Ownership verification by settlement provider
The Gateways API validates details.document only for format (11 or 14 digits and check digits) and validates details.key against the format expected for the keyType. It does not compare details.document with details.key, does not query DICT, and does not block the operation when the two differ. The payment is always addressed by the PIX key.
Checking the document against the actual key holder, where it exists, is done by the settlement provider configured on your account:
- Some providers check
details.documentwhenever the field is sent. On mismatch, the transaction ends inERROR, with no debit, and the webhook carries the provider's message. - Others only perform the check when you send
details.checkPixKeyWithDocument: true. - On the rest, the field is accepted but not checked: the payment is completed to the key owner.
How do I know how my account behaves? The settlement provider is defined per account. When in doubt, ask your integration manager. If your operation requires a mismatched document to block the payment, verify ownership on your side before sending: for keyType: DOCUMENT, make sure details.document equals details.key.
Code Examples
curl -X POST "https://<api-host>/api/pix/cash-out" \
-H "Authorization: Bearer $PIX_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"value": 150.00,
"externalId": "PAG-2024-0001",
"description": "Pagamento freelancer - Janeiro/2024",
"details": {
"key": "12345678909",
"keyType": "DOCUMENT",
"name": "Ana Costa",
"document": "12345678909"
}
}'const axios = require('axios');
const response = await axios.post('https://<api-host>/api/pix/cash-out',
{
"value": 150.00,
"externalId": "PAG-2024-0001",
"description": "Pagamento freelancer - Janeiro/2024",
"details": {
"key": "12345678909",
"keyType": "DOCUMENT",
"name": "Ana Costa",
"document": "12345678909"
}
},
{
headers: {
'Authorization': `Bearer ${process.env.PIX_API_TOKEN}`,
'Content-Type': 'application/json',
},
}
);
console.log(response.data);Response (201 Created)
| Field | Type | Description |
|---|---|---|
transactionId | string | Internal identifier of the generated transaction (numeric string) |
externalId | string | External identifier provided in the request |
status | string | Initial status: PENDING. Confirmation via webhook: CONFIRMED or ERROR |
generateTime | string | Transaction generation date/time (ISO 8601 UTC) |
{
"transactionId": "466208",
"externalId": "PAG-2024-0001",
"status": "PENDING",
"generateTime": "2024-01-15T10:30:00.000Z"
}Errors
Returned when the body does not pass validation. Errors in top-level fields (value, externalId, description, details or an unknown field) come with code: PUB_REQUEST_BODY_INVALID and the fields in details.violations, as in the example. Errors in details.* fields come with message as a list, one message per field.
{
"statusCode": 400,
"timestamp": "2026-04-10T15:30:34.560Z",
"path": "/api/pix/cash-out",
"method": "POST",
"code": "PUB_REQUEST_BODY_INVALID",
"message": "Request body validation failed: value: value must not be less than 0.01",
"userMessage": "Request body is invalid.",
"errorId": "a1b2c3d4e5f6789012345678abcdef01",
"details": {
"violations": {
"value": "value must not be less than 0.01"
}
}
}Common causes:
valueless than0.01or with more than 2 decimal placesdetails.keyTypewith invalid valuedetails.keydoes not match thekeyTypeformatdetails.documentwith an invalid CPF/CNPJexternalIdlonger than 50 characters ordescriptionlonger than 140details.checkPixKeyWithDocument: truewithoutdetails.document
See the PIX Cash-Out integration guide for code examples, local key validation, and best practices.