Skip to main content

Static BR Code

Introduction

The Static BR Code endpoint allows you to generate static QR Codes for receiving Pix payments. These QR Codes can be created with or without a fixed amount and can be associated with your main account or any of your sub-accounts.

This guide will walk you through how to use this endpoint to generate and manage your static BR Codes.

Generate Static BR Code

This endpoint generates a static BR Code. If a BR Code with the same parameters already exists for the account or sub-account, it will be returned. Otherwise, a new one will be created.

Parameters

The parameters should be sent as a query string in the GET request.

FieldTypeDescription
subAccountIdstringOptional. The ID of the sub-account from which the BR Code will be generated. If not provided, it will be generated from the main account.
amountstringOptional. The fixed amount for the BR Code. If zero, the payer is free to set the amount.
referenceLabelstringA unique identifier for the BR Code, like an external ID. It must be alphanumeric and have a maximum length of 19 characters. This field is required.
additionalDatastringOptional. Additional information that will be displayed to the payer when they scan the QR Code. It has a maximum length of 35 characters.

HTTP GET Request

https://api.sandbox.avenia.io:10952/v2/account/bank-accounts/brl/static-br-code

cURL Example:

curl -X GET "https://api.sandbox.avenia.io:10952/v2/account/bank-accounts/brl/static-br-code?amount=10.00&referenceLabel=yourUniqueReference" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

JSON Response

{
"brCode": "00020126580014br.gov.bcb.pix013600000000-0000-0000-0000-000000000000520400005303986540510.005802BR5913Your Name6009SAO PAULO62290525yourUniqueReference6304XXXX"
}

Conclusion

In this section, you have learned how to use the Static BR Code endpoint:

  • Generating a Static BR Code – Creating a new static QR Code for receiving payments.
  • Using Optional Parameters – Customizing the BR Code with a fixed amount, reference label, and additional data.
  • Generating for Sub-accounts – Creating BR Codes specifically for your sub-accounts.

You are now equipped to integrate static BR Code generation into your application.