Fire Bankingdocs

Introduction

What is PIX Bacen?

The PIX Bacen API is a version of the Avista API that follows the official specification from the Central Bank of Brazil (BACEN) for the PIX instant payment system. This version was developed to serve integrators who need compatibility with the standard BACEN format.

This API is an alternative to the standard Avista API. Both offer the same functionalities but with different request and response formats.

When should you use the PIX Bacen API?

Use this API when:

  • Your system is already integrated with other PSPs that follow the BACEN specification
  • You need to maintain compatibility with multiple PIX providers
  • Your application was built following the official Central Bank documentation
  • You prefer working with the V2 webhook format (envelope {type, data})

Key differences

Available endpoints

EndpointMethodDescription
/cob/:txidPUTCreate an immediate charge (PIX QR Code)
/pix/:e2eid/devolucao/:idPUTRequest a refund for a received PIX
/dict/pixPOSTInitiate a PIX transfer (Cash-Out)
/accounts/balancesGETQuery account balance

Comparison with the standard API

OperationStandard APIPIX Bacen API
Cash-InPOST /pix/cash-inPUT /cob/:txid
Cash-OutPOST /pix/cash-outPOST /dict/pix
RefundPOST /pix/:id/refundPUT /pix/:e2eid/devolucao/:id
BalanceGET /balanceGET /accounts/balances

Integration flow

sequenceDiagram
    participant Client
    participant Avista
    participant BACEN

    Note over Client,BACEN: 1. Authentication
    Client->>Avista: POST /oauth/token
    Avista-->>Client: access_token

    Note over Client,BACEN: 2. Create Charge
    Client->>Avista: PUT /cob/\{txid\}
    Avista->>BACEN: Register charge
    Avista-->>Client: QR Code + data

    Note over Client,BACEN: 3. Payment (via banking app)
    BACEN->>Avista: Payment webhook
    Avista->>Client: Webhook V2 (type: RECEIVE)

Next steps

On this page