Static QR code
A static QR code carries fixed payment information that does not change between transactions. Use it for recurring or standardized charges where the amount and payment details stay the same:- Fixed and reusable payment information.
- Suitable for recurring collections.
- Can be permanently displayed or printed.
POST /v2/in/pix/qrcodes/static. Send amount: 0 for an open-amount code, where the payer chooses the amount.
Dynamic QR code
A dynamic QR code is generated for one transaction and carries that transaction’s information. Use it for e-commerce platforms, payment service providers and automated payment flows:- Unique transaction information for each payment.
- Supports your own identifiers and metadata.
- Enables automated reconciliation and tracking.
POST /v2/in/pix/qrcodes, as shown below. After creation, PUT /v2/in/pix/qrcodes/{id} updates the amount, expiration_datetime or fee of an existing dynamic QR code and returns 204 No Content.
Dynamic QR code with due date
A dynamic QR code with due date is a dynamic QR code that carries a due date and the payment rules attached to it: fine, interest, rebate and discount. Use it when the charge behaves like an invoice. Create one withPOST /v2/in/pix/qrcodes/with_due.
Which type to use
Generate a dynamic QR code
All examples use the sandbox base URLhttps://api.sandbox.trio.com.br.
The default expiration time is 1 day, and the minimum allowed expiration time is 5 minutes.
Example request:
Response
On success the API returns201 Created with the QR code:
counterparty object and the creator is the nested origin object. counterparty.bank_accounts lists the bank accounts the payment must come from and is empty when any account is accepted. image is returned only when options.show_qrcode_image is true.
Coming from V1? The response no longer carries
virtual_account_id, entity_id, pix_key_id or timestamp. Timestamps are inserted_at and updated_at, and allow_change_the_amount_on_payment lives inside options.Deliver the code to the payer
- BR code: send the
hashso the payer pastes it into their banking application. - QR code image: render the
hashas a QR code image for the payer to scan. You can also ask the API for the image, either withoptions.show_qrcode_image: trueon creation or later withGET /v2/in/pix/qrcodes/{id}/image, which returns it in Base64.
Follow the payment
The QR code itself has astatus of created, settled or deleted. Once paid, the deposit becomes an in document that you list with GET /v2/documents/in and follow through webhook events. Each transaction progresses through the following 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).
.png?fit=max&auto=format&n=x8bS2HzNhei2b1vu&q=85&s=f4af44cc2e6cb1a72353845fa588b05b)
Next steps
- Cash in: a step-by-step walk through your first dynamic QR code.
- Simulate a successful deposit: pay the code in the sandbox.
- Pix Automático: recurring charges authorized once by the payer.
- Create a boleto: the same due-date rules on a boleto.

