> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# QR Codes

> How Pix QR Codes work in Brazil — static BR Codes, dynamic immediate, cobrança with due date, Pix Automático recurrence, and Pix Saque withdrawal.

Pix QR Codes let users pay across apps, websites, and physical points of sale. Every Pix participant reads the same format, so the codes work across institutions.

Pix uses **EMV®-based structured payloads** that BACEN standardizes. Any institution can encode payment instructions in this scannable, machine-readable format.

Pix Switch generates, decodes, and validates EMV Pix QR Codes, and it tracks each collection payment.

# Types of Pix QR Codes

***

Pix defines two primary categories of QR Codes:

* **Static QR Code** → reusable, fixed structure
* **Dynamic QR Code** → generated per transaction, with metadata, reconciliation, and expiration

The sections below describe each type against BACEN standards and common market usage.

# Static QR Code

***

### What it is

A **reusable** Pix QR Code holds a fixed payload tied to a Pix key (email, phone, CPF/CNPJ, EVP).

It does **not** expire. You can print, share, or display it, and it fits simple, low-volume payment scenarios.

### Characteristics

* Permanent and reusable
* Does not embed an amount by default (the payer types it)
* Simplest form of Pix acceptance
* Works offline (print, sticker, image)
* Complies with the EMV Pix static format

### Typical use cases

* Street vendors, cafés, kiosks
* Professionals (delivery drivers, barbers, tutors, freelancers)
* Donation campaigns
* One payment point shared by many payers

### Static QR Code payment flow

1. The merchant creates the QR Code once.
2. The customer scans it with any Pix-enabled app.
3. The customer types the amount.
4. The payment follows the standard Pix flow: validation → SPI → credit.
5. Settlement happens instantly.

### Benefits

* Easy to create and deploy
* Reusable without limit
* Works well in physical settings
* Needs no extra infrastructure

### Limitations

* No automatic reconciliation
* The payer types the amount, which risks a wrong value
* Cannot hold detailed metadata (order ID, invoice, and similar)

# Dynamic QR Codes

***

Each dynamic QR Code applies to one transaction and carries a structured payload with:

* predefined amount
* expiration time
* reconciliation identifiers
* metadata (order ID, description, payer details)

They add automatic reconciliation and traceability, which suits digital commerce.

Pix Switch generates dynamic immediate charges. It does not yet generate due-date, recurring, withdrawal, or change QR Codes.

## Dynamic (Immediate)

***

### What it is

A one-time QR Code for **instant payments**, with:

* a preset amount
* a short expiration window
* a unique transaction correlation ID

### Ideal for

* E-commerce checkout
* Delivery apps
* POS systems
* Restaurants (per table or command)

### Characteristics

* Strong metadata and reconciliation support
* Expires automatically
* One-time use only
* Real-time webhook confirmation

## Pix Cobrança (Dynamic with Due Date)

***

### What it is

A dynamic QR Code for **payments with a due date**, similar to an invoice.

It carries:

* due date
* interest and late fees
* discounts or abatements
* payer identification

### Ideal for

* Schools and universities
* Condominium or association fees
* Subscription or recurring billing
* Professional invoices

### Characteristics

* Holds full billing information
* Stays valid until expiration
* Automatic reconciliation uses the charge ID

## Pix Automático (Recurrent)

***

Pix Automático sets up **recurring collection authorizations**.

The QR Code serves as the initial consent request for periodic debits.

### Ideal for

* Subscriptions
* Utility bills
* Monthly services

## Pix Saque (Withdraw)

***

### What it is

A QR Code that lets a customer **withdraw cash** from an authorized merchant.

### Ideal for

* Retail stores that offer ATM-like convenience
* Pharmacies, supermarkets, or convenience stores

## Pix Troco (Change)

***

### What it is

A QR Code for when the customer pays **more than the purchase amount**. The customer receives the product and gets the difference back as a Pix.

### Ideal for

* Supermarkets
* Gas stations
* Convenience stores

# Payment flow (all QR types)

***

<Frame caption="Figure 1. Pix QR Code payment flow">
  <img src="https://mintcdn.com/lerian-49cb71fc/SEOef3JqTInYAAau/images/en/d2/payment-qrcode-flow.svg?fit=max&auto=format&n=SEOef3JqTInYAAau&q=85&s=665bb7d589132ef1c76b23aa3ea3f2fd" alt="Payment flow for a Pix QR code, covering both static and dynamic QR types from scan to settlement" width="494" height="1194" data-path="images/en/d2/payment-qrcode-flow.svg" />
</Frame>

## End-to-end Pix QR Code flow

***

1. **QR Code creation**

   The merchant or system creates a Pix QR Code, either static (reusable) or dynamic (transaction-specific).

   For a dynamic QR Code, the payload may hold a predefined amount, an expiration, and reconciliation identifiers.

2. **Payment initiation by the payer**

   The payer scans the QR Code with any Pix-enabled bank or wallet app. The payer reviews the payment details before confirmation.

3. **Pre-transaction validation by the payer’s institution**

   Before it sends the payment, the payer’s institution runs mandatory checks. These cover account status, available balance, transaction limits, and internal risk.

4. **Settlement through the Pix infrastructure**

   After approval, BACEN’s SPI routes the payment instruction for real-time settlement.

   If both accounts belong to the same institution, the institution may settle internally without crossing the SPI.

5. **Instant credit to the receiving institution**

   The receiving institution credits the funds to the beneficiary’s account right after settlement. This completes the payment.

6. **Confirmation and reconciliation**

   Pix Switch emits webhook notifications with the payment result to merchant or system backends. The backends then reconcile automatically, confirm the order, and update accounting.

# Typical use cases

***

### Static

* A bakery prints a single QR Code for the counter
* A barbershop shares its QR Code on WhatsApp
* A street vendor displays a laminated QR Code

### Dynamic Immediate

* E-commerce checkout (one QR per order)
* Restaurants that generate a code per table
* Delivery apps that present a QR for each drop-off

### Dynamic Due Date

* Schools that generate a monthly QR Code invoice
* Condominium fees with interest or discount rules
* Freelancers that issue billed invoices

### Withdraw / Change

* A store offers Pix Saque at the counter
* A customer pays R$ 120 for a R$ 98 purchase and gets R\$ 22 back as Pix Troco

# Regulatory notes (BACEN)

***

Pix QR Codes must comply with:

* **EMV® Merchant-Presented Mode (MPM) specification**
* Pix “Iniciação por QR Code” rules
* Mandatory CRC validation
* A defined field structure for dynamic charges
* Expiration and billing rules for Cobrança (due-date QR)
* Transaction limits and the night window (when it applies)

<Tip>
  **Regulatory reference**

  Always refer to the [official documentation](https://www.bcb.gov.br/estabilidadefinanceira/pix-normas) from the **Central Bank of Brazil (BACEN)** for technical, legal, and regulatory details. BACEN publishes rule changes, deadlines, and official requirements there.

  BACEN’s materials are the authoritative source for Pix regulations. They hold the most complete and current specifications.
</Tip>
