Creating a static QR Code
Receive payments with a static Pix QR Code
The static Pix QR Code lets you receive multiple payments using the same Pix key. It only expires when an expiration date is set.
This format can be used in scenarios where the same QR Code is available to different payers, such as in a retail store.
By the end of this guide, you will know how to create a static Pix QR Code, identify the payments received, and query the payments generated from it.
1. Create the static QR Code
Have at hand the Pix key that will receive the payments and send the request:
POST /v3/pix/qrCodes/static{
"addressKey": "b6295ee1-f054-47d1-9e90-ee57b74f60d9",
"description": "Barbecue",
"value": 50.00,
"format": "ALL",
"expirationDate": "2023-05-17 14:20:50",
"expirationSeconds": null
}See the endpoint: Create static QR Code.
The response provides the QR Code id and the payload with the QR Code data in Base64.
There is no need to create a payment beforehand or define the customer. When the payment is made, the payer's details will be imported and a payment will be created automatically.
2. Identify the payment
Track the Webhook for payments events.
When you receive a payment received event, the pixQrCodeId field will identify the static QR Code used.
3. Query the generated payments
Use the pixQrCodeId to list the payments created from the QR Code:
GET /v3/payments?pixQrCodeId=9bea9bcd226b45c7980065f598be54d5See the endpoint: List payments.
Next steps
Updated 4 days ago
