Skip to content

PIX Cash Out by Key

Performs a PIX transfer using the recipient's PIX key.

Endpoint

POST /api/external/pix/cash-out

Headers

HeaderTypeRequiredDescription
AuthorizationStringYesApiKey {client_id}:{client_secret}
Content-TypeStringYesapplication/json
hmacStringYesHMAC-SHA512 signature of the body (hex)
Idempotency-KeyStringNoUnique key to prevent duplicate processing (max 256 chars)

Authentication

See Authentication. The HMAC signature must be generated as described in HMAC-SHA512.

Request Body

FieldTypeRequiredDescription
amountIntegerYesAmount in centavos. R$ 30.00 = 3000
pix_keyStringYesRecipient's PIX key
pix_key_typeStringNoKey type: cpf, cnpj, email, phone, evp. If omitted, auto-detected from the key value.
descriptionStringNoTransfer description (max 140 characters)
external_idStringNoYour system identifier for tracking. Max 128 chars. Only a-zA-Z0-9._:-. Returned in responses and webhooks.

Monetary values

Request values are in centavos (R$ 1.00 = 100). Response values are in base units (R$ 1.00 = 10000). To convert the response to BRL, divide by 10,000. Never use floating point.

Example

bash
curl -X POST https://api.owem.com.br/api/external/pix/cash-out \
  -H "Authorization: ApiKey $CLIENT_ID:$CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -H "hmac: $HMAC" \
  -d '{
    "amount": 3000,
    "pix_key": "12345678901",
    "pix_key_type": "cpf",
    "description": "Pagamento fornecedor",
    "external_id": "order-9876"
  }'

Success Response -- 200

json
{
  "worked": true,
  "transaction_id": "PIXOUT20260309a1b2c3d4e5f6",
  "end_to_end_id": "E37839059202603091530abcdef01",
  "external_id": "order-9876",
  "amount": 300000,
  "fee_amount": 350,
  "net_amount": 300350,
  "status": "accepted",
  "detail": "PIX enviado para processamento"
}
FieldTypeDescription
workedBooleantrue indicates the request was accepted
transaction_idStringUnique transaction identifier
end_to_end_idStringEnd-to-End identifier in SPI/BACEN (format E{ISPB}...)
external_idStringYour identifier, returned as sent. null if not provided
amountIntegerTransfer amount in base units (/ 10,000 for BRL). 300000 = R$ 30.00
fee_amountIntegerFee charged in base units (/ 10,000 for BRL)
net_amountIntegerNet amount (amount + fee) in base units
statusStringaccepted (accepted for processing) or completed (settled)
detailStringDescriptive message

Error Response -- 400

json
{
  "worked": false,
  "detail": "Chave PIX invalida"
}

Error Response -- 422

json
{
  "worked": false,
  "detail": "Saldo insuficiente"
}

PIX Key Types

TypeFormatExample
cpf11 digits (no punctuation)12345678901
cnpj14 digits (no punctuation)12345678000199
emailEmail addressnome@empresa.com.br
phone+55 + area code + number+5511999998888
evpUUID v4a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d

11-Digit Keys — CPF vs Phone Ambiguity

Keys with exactly 11 digits can be either a CPF or a mobile phone number (area code + 9xxxx-xxxx). When the key is ambiguous, the API returns the pix_key_ambiguous error.

Recommended solution:

  1. Use the CPF Validation endpoint (POST /api/external/cpf/validate) to check if the 11 digits form a valid CPF
  2. If valid: true → send pix_key_type: "cpf" in the cash-out request
  3. If valid: false → it's a phone number, send pix_key_type: "phone" (the API automatically adds the +55 prefix)
javascript
// Example automated flow
async function resolveKeyType(key) {
  if (key.length !== 11 || /\D/.test(key)) return null; // no ambiguity
  
  const { data } = await api.post('/api/external/cpf/validate', { cpf: key });
  return data.valid ? 'cpf' : 'phone';
}

Tip: Keys with formatting (dots, dashes) or with the +55 prefix are auto-detected — pix_key_type is only needed for raw 11-digit numbers.

Next Steps

After creating the transfer, track the status via:

Or receive confirmation automatically via Webhook.

Owem Pay Instituição de Pagamento — ISPB 37839059