Skip to main content
QR Codes in the Pix ecosystem provide a fast, secure, and efficient way to process payments and collections. There are two primary categories of Pix QR Codes: Static QR Codes and Dynamic QR Codes. As most Trio customers are online merchants and PSPs, this guide focuses on the use of Dynamic QR Codes for automated integrations.

Static QR Code

A Static QR Code contains fixed payment information that does not change between transactions. It is recommended for recurring or standardized payments where the amount and payment details remain the same.

Main Characteristics

  • Fixed and reusable payment information;
  • Suitable for recurring collections;
  • Can be permanently displayed or printed.

Dynamic QR Code

A Dynamic QR Code is uniquely generated for each transaction and contains transaction-specific information. It is recommended for e-commerce platforms, PSPs, and automated payment flows.

Main Characteristics

  • Unique transaction information for each payment;
  • Supports custom identifiers and metadata;
  • Enables automated reconciliation and tracking.

Generating a Dynamic QR Code

To generate a Dynamic QR Code, you must provide the required transaction information, including:
  • virtual_account_id: the virtual account that will receive the funds;
  • external_id: your internal transaction reference;
  • amount: transaction amount in cents (example: 1200 = BRL 12.00);
  • counterparty: payer information, including tax_number and name;
  • expiration_datetime: QR Code expiration date in ISO 8601 format.
The default expiration time is 1 day, and the minimum allowed expiration time is 5 minutes.

Create QR Code Endpoint

To generate a Dynamic QR Code, send a POST request to the endpoint below:
Example request payload:

Successful Response

If the request is successfully processed, the API will return a 201 Created response similar to the example below:

Payment Methods

After generating the QR Code, you can provide the payment information to the user using:
  • Pix Copy and Paste: send the generated hash value so the user can paste it into their banking application;
  • QR Code Image: generate a QR Code image using the hash value so the user can scan it with their banking application.

Document Lifecycle

Each QR Code transaction progresses through the following lifecycle stages:
  • created: transaction received and queued for processing;
  • registering: transaction is being processed;
  • settled: transaction successfully processed and settled (final state);
  • failed: transaction refused due to validation or compliance rules (final state for cash out).
Follow a diagram that represents the flow:
Image (29)