docs

Introduction

What is PIX Bacen?

The PIX Bacen API is a version of the FyPay 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 FyPay API for the operations listed below (charge, transfer by key, refund, and balance). Both use the same base URL (https://api.fypay.me/api), the same authentication, and the same business rules; only the request and response formats change.

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

All endpoints are under the base URL https://api.fypay.me/api, with no additional prefix:

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

Comparison with the standard API

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

Integration flow

sequenceDiagram
    participant Client
    participant FyPay
    participant BACEN

    Note over Client,BACEN: 1. Authentication
    Client->>FyPay: POST /api/auth/token
    FyPay-->>Client: access_token

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

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

Next steps

On this page