BRPIX MERCHANT API

API Documentation

High-performance payment gateway for Pix In, Pix Out, payment requests, and multilevel payment splits. The API supports secure integration and compliance with Central Bank of Brazil requirements.

Base URL https://api.brpix.app
● API Online
⏱ < 300 ms response
✓ BACEN Compliant
🔒 mTLS Required
🔄 Idempotency
🛡️

Authentication and client certificate

Use your mTLS client certificate on every request. For protected endpoints, also include the Bearer JWT obtained from POST /v1/auth/token.

Quickstart
Authenticate, check your balance, and create a Pix charge in under a minute.
1

Get your credentials

Create your API Key (key_id + key_secret) and client certificate in the BRPix dashboard. Add your application’s outbound IP address to the credential’s allowlist.

2

Authenticate and get an access token

Exchange your credentials for a short-lived JWT. Renew it with POST /v1/auth/refresh.

Shell
# Exchange key_id and key_secret for a JWT
curl -sX POST https://api.brpix.app/v1/auth/token \
  --cert cert.pem --key key.pem \
  -H "Content-Type: application/json" \
  -d '{"key_id":"bk_<your_id>","key_secret":"<your_secret>"}' \
  | jq -r '.access_token'
3

Check your available balance

Send the JWT in the Authorization header to access protected resources.

Shell
curl -s https://api.brpix.app/v1/balance \
  --cert cert.pem --key key.pem \
  -H "Authorization: Bearer <access_token>"
4

Create a Pix charge

Create a Pix QR code with an optional split. The Idempotency-Key header prevents duplicate charges when you retry a request.

Shell
curl -sX POST https://api.brpix.app/v1/pix/charges \
  --cert cert.pem --key key.pem \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <access_token>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "amount": "100.00",
    "acquirer_id": "",
    "description": "Order #4521",
    "expires_in": 3600
  }'
201 Created response
{
  "id": "3f7a2b1c-...",
  "status": "PENDING",
  "amount": "100.00000",
  "qr_code": "00020101...",
  "expires_at": "2026-10-09T22:00:00Z"
}
Documentation by topic
Detailed guides for each API feature.
API Endpoints
Endpoints available in the BRPix Merchant API v1.0.0.
🔁 Pix Transfers (Cashout)
POST /v1/pix/transfers Create an asynchronous Pix transfer · requires mTLS GET /v1/pix/transfers/:id Get the status of a transfer GET /v1/pix/transfers?external_id= Find transfers by your order number (external_id)

Transfer webhook and order number

Send your system's order number in external_id when creating the transfer (optional, up to 100 characters). It is returned by GET /v1/pix/transfers/:id, by the lookup GET /v1/pix/transfers?external_id= and in the transfer webhook, together with the Pix end_to_end_id when available.

{
  "event": "transfer",
  "id": "a7fa21dd-0f37-4ef3-b19e-cb07fb9b27dc",
  "status": "CONFIRMADO",
  "amount": "50.00000",
  "pix_key": "[email protected]",
  "end_to_end_id": "E12345678202610101400abcdef012",
  "external_id": "ORDER-123",
  "recipient": {
    "name": "Example Person",
    "document": "00000000000",
    "bank_name": null
  },
  "updated_at": "2026-10-10T14:07:23Z"
}

recipient contains the recipient's name, document (CPF/CNPJ) and bank when provided by the liquidant; otherwise it is null (e.g. on PENDENTE). The example uses fictitious data.

Statuses: in the webhook status is in Portuguese; in the API lookup it is in English. Mapping: PENDENTE = PENDING, PROCESSANDO = PROCESSING, CONFIRMADO = CONFIRMED (completed), FALHOU = FAILED, ESTORNADO = REVERSED.

Failure reason

When a transfer ends as FAILED / REVERSED (in the webhook, FALHOU / ESTORNADO), GET /v1/pix/transfers/:id, the lookup and the transfer webhook include failure_code and failure_reason. failure_reason carries the liquidant's message when available (e.g. "Chave PIX inválida: …", in Portuguese); otherwise a default description. For other statuses both fields are null.

{
  "event": "transfer",
  "id": "a7fa21dd-0f37-4ef3-b19e-cb07fb9b27dc",
  "status": "FALHOU",
  "amount": "10.00000",
  "external_id": "ORDER-123",
  "failure_code": "INVALID_PIX_KEY",
  "failure_reason": "Chave PIX inválida: informe um CPF, CNPJ, e-mail, chave aleatória ou celular no formato +55 + DDD + celular com 9 dígitos (ex.: +5511988887777). Nada foi reservado."
}

Codes: INVALID_PIX_KEY (invalid Pix key — phone keys must be +55 + area code + number), PIX_KEY_NOT_FOUND (key not found), PROVIDER_REJECTED (rejected by the liquidant), PROVIDER_UNAVAILABLE (liquidant unavailable, nothing was sent), LIMIT_EXCEEDED (limit exceeded), KYC_REQUIRED (account verification pending), CANCELLED (cancelled before sending), REFUNDED_BY_PROVIDER (returned by the liquidant), UNKNOWN (no detail available). On any failure, the amount and fee are refunded to your balance.

Pix recipient details webhook

Under API Keys → Webhooks, edit Transfer (transfer) and enable Incluir dados do recebedor (Fyhub). For new Fyhub confirmations, BRPix sends transfer.recipient_details in a second request to the same URL once recipient details are available. Use the id to match the two events. The example uses fictional data.

{
  "event": "transfer.recipient_details",
  "id": "a7fa21dd-0f37-4ef3-b19e-cb07fb9b27dc",
  "document": "00000000000000",
  "name": "Example Recipient",
  "bank_name": null
}

document contains the recipient's full Brazilian CPF or CNPJ, verified against Fyhub and sent as a string without separators. If Fyhub returns only a masked document, document is null. Any other unavailable field is also null. Use event and id together to identify retries.

Use a public domain with HTTPS and configure a signing secret under Transfer. Verify the HMAC-SHA256 of the raw request body via the X-Webhook-Signature header in sha256=<hex> format.

Fyhub Pix Out refund webhook

Configure the transfer event under API Keys → Webhooks. For a full refund, the webhook reports status: ESTORNADO and the transfer lookup returns REVERSED. A partial refund keeps the CONFIRMADO status.

refund_amount is the principal for this refund and refunded_amount is the cumulative principal. fee_refunded is the fee returned in this event and total_refunded includes the cumulative principal and any fee already returned. Use refund_end_to_end_id to deduplicate deliveries.

When a signing secret is configured, verify the HMAC-SHA256 of the raw body using the X-Webhook-Signature header in sha256=<hex> format.

Interactive OpenAPI Reference

Explore schemas, try requests, and view API responses directly in your browser.

Open the reference →