Skip to content

PIX API

The PIX API enables sending and receiving instant payments via Brazil's PIX system.

Overview

EndpointMethodDescription
/api/v1/pix/chargesPOSTCreate a PIX charge (receive payment)
/api/v1/pix/charges/:idGETGet charge details
/api/v1/pix/payoutsPOSTCreate a PIX payout (send payment)
/api/v1/pix/payouts/:idGETGet payout details
/api/v1/pix/dict/:keyGETLook up a PIX key in DICT
/api/v1/pix/qrcodePOSTGenerate a PIX QR code

PIX In (Receiving Payments)

Create a Charge

http
POST /api/v1/pix/charges
Authorization: Bearer {token}
Content-Type: application/json

{
  "amount": 15000,
  "description": "Order #12345",
  "payer": {
    "document": "12345678901",
    "name": "Maria Silva"
  },
  "expiration": 3600,
  "metadata": {
    "order_id": "12345",
    "customer_id": "cust_abc"
  }
}

TIP

Amounts are always in centavos (smallest currency unit). R$ 150.00 = 15000.

Response:

json
{
  "data": {
    "id": "chg_01HQGX...",
    "status": "pending",
    "amount": 15000,
    "description": "Order #12345",
    "pix_key": "pix@fluxiq.com.br",
    "qr_code": "00020126580014br.gov.bcb.pix...",
    "qr_code_image": "data:image/png;base64,...",
    "expiration": "2026-02-03T13:00:00Z",
    "created_at": "2026-02-03T12:00:00Z"
  }
}

Charge Statuses

StatusDescription
pendingAwaiting payment
paidPayment received and confirmed
expiredCharge expired without payment
cancelledCharge cancelled by merchant
refundedPayment was refunded

PIX Out (Sending Payments)

Create a Payout

http
POST /api/v1/pix/payouts
Authorization: Bearer {token}
Content-Type: application/json

{
  "amount": 5000,
  "description": "Supplier payment",
  "recipient": {
    "pix_key": "supplier@company.com",
    "pix_key_type": "email"
  },
  "idempotency_key": "payout_20260203_001"
}

WARNING

Always include an idempotency_key to prevent duplicate payouts. The same key within 30 days will return the original response.

Response:

json
{
  "data": {
    "id": "pay_01HQGX...",
    "status": "processing",
    "amount": 5000,
    "recipient": {
      "pix_key": "supplier@company.com",
      "pix_key_type": "email",
      "name": "Empresa XYZ LTDA",
      "document": "12345678000190",
      "bank": "Nubank",
      "ispb": "18236120"
    },
    "idempotency_key": "payout_20260203_001",
    "created_at": "2026-02-03T12:00:00Z"
  }
}

Payout Statuses

StatusDescription
processingPayout submitted to provider
confirmedPayment confirmed by BACEN
failedPayment failed (insufficient funds, invalid key, etc.)
cancelledPayout cancelled before processing
returnedPayment returned by recipient bank

DICT Lookup

Look up a PIX key to verify the recipient before sending:

http
GET /api/v1/pix/dict/supplier@company.com
Authorization: Bearer {token}

Response:

json
{
  "data": {
    "key": "supplier@company.com",
    "key_type": "email",
    "account": {
      "participant_ispb": "18236120",
      "participant_name": "Nubank",
      "branch": "0001",
      "account_number": "12345678",
      "account_type": "checking"
    },
    "owner": {
      "name": "Empresa XYZ LTDA",
      "document": "12345678000190",
      "document_type": "cnpj"
    }
  }
}

PIX Key Types

TypeFormatExample
cpf11 digits12345678901
cnpj14 digits12345678000190
emailEmail addresspix@company.com
phone+55 + DDD + number+5511999999999
evpUUID v4a1b2c3d4-e5f6-7890-abcd-ef1234567890

QR Code Generation

http
POST /api/v1/pix/qrcode
Authorization: Bearer {token}
Content-Type: application/json

{
  "type": "dynamic",
  "amount": 15000,
  "description": "Order #12345",
  "expiration": 3600
}

Response:

json
{
  "data": {
    "type": "dynamic",
    "payload": "00020126580014br.gov.bcb.pix...",
    "image_base64": "data:image/png;base64,...",
    "image_url": "https://api.fluxiq.com.br/qr/chg_01HQGX.png"
  }
}

Webhooks

PIX events are delivered via webhooks. See Webhooks for configuration.

EventDescription
pix.charge.paidA charge was paid
pix.charge.expiredA charge expired
pix.payout.confirmedA payout was confirmed
pix.payout.failedA payout failed
pix.payout.returnedA payout was returned
pix.refund.completedA refund was completed

Error Codes

CodeHTTP StatusDescription
INSUFFICIENT_FUNDS422Account balance too low for payout
INVALID_PIX_KEY422PIX key not found in DICT
DUPLICATE_PAYOUT409Idempotency key already used
AMOUNT_TOO_LOW422Amount below minimum (R$ 0.01)
AMOUNT_TOO_HIGH422Amount exceeds daily limit
CHARGE_EXPIRED410Charge has expired
PROVIDER_ERROR502PIX provider returned an error

FluxiQ Core - PIX Payment Gateway