Pix API: How to Integrate Pix Into Your Platform

BaaS

Infrastructure

White network cables plugged into a patch panel in a bright server room

A subscription platform in São Paulo issues 600 Pix charges a day. Its finance team matches payments against the bank statement every evening, and when a customer pays the same invoice twice, nobody notices until the following week. The fix is not more spreadsheets. So what does a Pix API actually do, and what does it take to integrate one?

A Pix API lets your system create Pix charges, show the QR code, receive a notification the moment a payment settles and issue refunds, with an identifier that ties each payment to an order. The Central Bank of Brazil (BCB) publishes a reference specification for this API, and you access it through a licensed institution that participates in Pix.

What is a Pix API?

A Pix API is the interface a Pix participant exposes so that a receiving company can automate charges, payments received and refunds. The BCB publishes the API Pix specification on GitHub, in OpenAPI 3.0 format, to standardize the services that the receiving payment service provider (PSP) offers to its clients.

The BCB does not run the API for companies. Your bank or payment institution implements it, issues your credentials and connects your system to Pix. If you need a refresher on how the scheme itself works, start with what Pix is and how it works.

What can you do through a Pix API?

The specification groups its endpoints by resource. These are the five that matter most for a company collecting payments in BRL.

1. Create immediate and due-date charges

An immediate charge (cob) is meant to be paid now, such as a checkout or an in-app purchase. A due-date charge (cobv) carries a due date and can include fines, interest and discounts, which makes it the Pix equivalent of an invoice. The specification also covers batches of due-date charges and charges linked to recurring payments.

2. Generate static and dynamic QR codes

A static QR code holds fixed information and offers few configurable features, so it suits simple, repeated payments. A dynamic QR code points to a location where the payer's institution retrieves the charge details, which lets each order carry its own amount, expiry and identifier.

3. Receive webhooks when a Pix settles

A webhook is a notification your provider sends to your system when a Pix is received. Instead of polling the bank statement, your order system learns about the payment as soon as it settles and can release the product or mark the invoice as paid.

4. Query received Pix and reconcile

Every charge carries a txid, the identifier your system assigns to it, and every Pix carries an end-to-end ID that identifies the transaction across institutions. Querying received Pix by period, txid or end-to-end ID is what makes automated reconciliation possible.

5. Issue full or partial refunds

A refund (devolução) is requested against the end-to-end ID of the original Pix, for the full amount or part of it. Because the refund references the original payment, your ledger keeps one clean trail per order.

What about sending Pix to recipients?

The BCB specification focuses on the receiving side: charges, payments received, refunds and queries. Sending Pix to suppliers, contractors or users is offered by each institution through its own interface, so the scope and format vary from one provider to another.

If your operation pays people in Brazil as well as collecting from them, ask for both capabilities in the same integration. The mechanics of paying recipients are covered in how BRL payouts work for global companies.

How does a Pix API integration work, step by step?

The steps are similar across providers. What changes is how much each provider does for you between them.

1. Sign up with a Pix participant

The receiving company opens an account with a licensed institution that participates in Pix, completes onboarding and registers its Pix keys. Onboarding and contractual requirements depend on the services and operating model.

2. Get credentials and set up security

The specification uses OAuth 2.0, with a separate permission scope for each resource, such as writing or reading charges. Further security requirements are set by the BCB's Pix security manual and by your provider, so confirm them before development starts.

3. Build in a test environment

The specification lists separate production and testing servers. Use the test environment to create charges, simulate payments and exercise refunds before any real money moves.

4. Handle webhooks and retries

Design your webhook endpoint to accept the same notification more than once without processing it twice. Treat the txid and the end-to-end ID as idempotency keys, so a retried notification never marks two orders as paid.

5. Automate reconciliation

Match every received Pix to an order by txid, store the end-to-end ID, and run a daily query against the provider to catch anything a webhook missed. Exceptions, such as overpayments or payments without a matching charge, go to a review queue.

6. Go live and monitor

Move to production with alerts on failed webhooks, unmatched payments and refund errors. Pix runs 24 hours a day, every day, so monitoring needs to run on the same schedule.

What does one charge look like, from QR code to reconciliation?

A software company bills a customer BRL 1,200 for an annual plan. The values below are illustrative.

  1. The billing system creates an immediate charge for BRL 1,200 with a txid tied to the customer's order.

  2. The checkout shows the dynamic QR code, and the customer pays from their bank app.

  3. The provider sends a webhook with the txid and the end-to-end ID of the payment.

  4. The system marks the order as paid and posts the entry to the ledger.

  5. A week later the customer downgrades, and the system requests a partial refund of BRL 200 against the same end-to-end ID.

  6. The daily reconciliation shows one payment of BRL 1,200 and one refund of BRL 200, both linked to the same order.

Still reconciling Pix by bank statement? See how Pix collections and payouts work through one API.

What should you check in a Pix API provider?

Most providers can generate a QR code. The differences show up in operations, after launch.

  • License: the provider is an institution authorized by the BCB and a Pix participant.

  • Coverage of the specification: immediate and due-date charges, webhooks, refunds and queries are available, and you know which ones are not.

  • Payouts: sending Pix is available in the same integration, if you need it.

  • Test environment and documentation: you can build and test without moving real funds.

  • Disputes: the provider explains how it handles refund requests and the Special Return Mechanism (MED).

  • Limits and support: transaction limits, notification behavior and support hours are written in the contract.

The business case for integrating Pix into your systems, beyond the technical steps, is covered in how Banking as a Service connects Pix to your operations.

How does Transfero support platforms integrating Pix?

Transfero's Banking as a Service (BaaS) lets companies move money in Brazil without becoming a bank. Transfero Instituição de Pagamento Ltda. is authorized by the Central Bank of Brazil to operate as a payment institution.

  • Banking infrastructure to collect and send BRL funds through Pix

  • Banking rails without setting up a local entity or obtaining a local license

  • A launch path measured in weeks: most clients can launch within a few weeks

  • 99.999% uptime published for the BaaS infrastructure

Questions to ask before integrating a Pix API

  • Which parts of the BCB API Pix specification does the provider support?

  • Can you send Pix through the same integration, or only receive?

  • How does the provider authenticate API calls and protect credentials?

  • Is there a test environment that mirrors production?

  • How are webhooks retried, and how will you avoid processing a payment twice?

  • How are refunds and MED requests communicated to your system?

  • What limits apply to transactions and API calls?

Talk to our team about integrating Pix into your platform: get in touch.

Frequently asked questions

Is there an official Pix API standard?

Yes. The Central Bank of Brazil publishes the API Pix specification in OpenAPI 3.0 format on GitHub. It standardizes the services a receiving institution offers to its clients, such as charges, received payments, refunds and queries. Each institution implements the standard and issues its own credentials.

Do I need a Brazilian entity to use a Pix API?

You need an account with an institution that participates in Pix, because Pix is a domestic payment scheme in reais. Some licensed providers offer access to Brazilian payment rails without the client setting up its own entity or license. Onboarding and contractual requirements depend on the services and operating model.

What happens if a customer pays the same charge twice?

Each Pix has its own end-to-end ID, so a second payment arrives as a separate transaction. A system that reconciles by txid and end-to-end ID can detect the duplicate and return it through the refund endpoint, referencing the second payment, instead of leaving it for finance to find later.

What is MED and how does it affect a Pix integration?

The Special Return Mechanism (MED) is the BCB's process for returning Pix funds in cases of fraud or operational failure, set by BCB Resolution No. 103 and updated by Resolution No. 493. Your integration should be ready to receive notice of a MED request and to reflect a returned amount in the order and the ledger.

Is Pix available 24/7?

Yes. Pix runs 24 hours a day, every day, including weekends and holidays, and funds are available to the recipient within seconds. Your webhook endpoint, monitoring and support processes should run on the same schedule.

Virtual asset services in Brazil are provided by Transfero SPSAV Ltda., CNPJ 34.882.109/0001-11, whose application for authorization as a virtual asset service provider (sociedade prestadora de serviços de ativos virtuais), in the brokerage category (corretora), is under review by the Central Bank of Brazil (case no. 315.453). Virtual assets are not covered by Brazil’s Credit Guarantee Fund (FGC).

© 2026 Transfero → All rights reserved

Virtual asset services in Brazil are provided by Transfero SPSAV Ltda., CNPJ 34.882.109/0001-11, whose application for authorization as a virtual asset service provider (sociedade prestadora de serviços de ativos virtuais), in the brokerage category (corretora), is under review by the Central Bank of Brazil (case no. 315.453). Virtual assets are not covered by Brazil’s Credit Guarantee Fund (FGC).

© 2026 Transfero → All rights reserved

Virtual asset services in Brazil are provided by Transfero SPSAV Ltda., CNPJ 34.882.109/0001-11, whose application for authorization as a virtual asset service provider (sociedade prestadora de serviços de ativos virtuais), in the brokerage category (corretora), is under review by the Central Bank of Brazil (case no. 315.453). Virtual assets are not covered by Brazil’s Credit Guarantee Fund (FGC).

© 2026 Transfero → All rights reserved