Create QR Codes
This specification is subject to change, it is Work in Progress. The Colombian EASPBV standard is evolving to support the capabilities of the Bre-B network.
Passport is actively collaborating with industry stakeholders to shape a flexible and robust QR Code integration model for real-time payments.
Overview
This endpoint allows you to create a Bre-B compliant QR Code using the Passport PaaS API. It encodes payment and contextual metadata as defined by the Colombian EASPBV standard, returning a unique QR Code ID and associated resource details.
QR Codes Types
The supported types are: Dynamic and Static QR codes.
Endpoint Details
Definition | Description |
|---|---|
Endpoint | |
Method | POST |
Headers | Content-Type: application/json, Authorization |
Authentication | Access Token (Bearer Token) |
Request Body
Parameter | Type | Required | Description |
|---|---|---|---|
key_id | String | Yes | The unique identifier of the previously created Bre-B key associated with the merchant account. |
customer_id | String | Yes | The unique identifier of the customer (merchant) initiating the transaction. |
type | ENUM | Yes | Type of QR Code: |
channel | ENUM | Yes | Where the QR Code will be used:
|
additional_info | Object | Yes | Additional meta data for the transaction. |
additional_info.transaction_purpose | ENUM | Yes | Purpose of the transaction: 00: Compras 02: Anulaciones 03: Transferencias 04: Retiro 05: Recaudo 06: Recargas 07: Depósito Use 2 digits instead of the string value. |
qr_code_reference | String | Optional | A unique reference that can be set so it is passed through the network with the associated Payment. Maximum of 17 alphanumeric characters. The letter P is not permitted. In the Bre-B logic, the PaaS platform will add “CO.COM.VISI.TRXID” to the message and the letter P is part of the internal identification for this reference field. For example, if the reference below is sent to the PaaS platform:
When the payment and its notifications are received, the following reference will be added and shown:
|
additional_info.invoice_number | String | Optional | Invoice number (max 25 characters). |
additional_info.mobile_phone number | String | Optional | Mobile phone number linked to the transaction (max 25 characters). |
additional_info.store_label | String | Optional | Store identifier (max 25 characters). |
additional_info.loyalty_label | String | Optional | Loyalty program reference for the Buyer (max 25 characters). |
additional_info.reference_label | String | Optional | Unique transaction reference (max 25 characters). |
additional_info.customer_label | String | Optional | Store the Buyer unique identifier (max 25 characters). |
additional_info.terminal_label | String | Yes | POS terminal ID (max 25 characters). |
additional_info.customer_info | ENUM | Optional | An indicator whether the device scanning the QR Code needs to capture information from the Customer. Use one of the DIGIT codes below:
|
additional_info.channel_presentation | String | Optional | A 3 digit field used to compliment the First Character: The medium used: 0 - Printed - Adhesive 1 - Printed - Invoice 2 - Printed - Magazine / Poster 3 - Printed - Other 4 - Screen - Merchant POS 5 - Screen - Website 6 - Screen - App 7 - Screen - Other Second Character: The location presented: 0 - the registered address of the business 1 - different from the registered address of the business 2 - remote commerce 3 - other Third Character: How it was presented: 0 - if a cashier was present 1 - if a cashier was not present 2 - self attended box / checkout 3 - other |
vat | Object | Required | An object to track the VAT applied to the transaction being represented by the QR Code. |
vat.vat_type | ENUM | Required | Indicates how the VAT will be calculated for the transaction:
|
vat.vat_value | String | Required | VAT value: If If |
vat.vat_base value | String | Required | Indicates the VAT Base Value |
inc | Object | Conditional | An object to track the INC applied to the transaction being represented by the QR Code. Required for Dynamic QR Codes if an Amount is provided. |
inc.inc_type | ENUM | Conditional | Indicates how the INC will be calculated for the transaction:
|
inc.inc_value | String | Conditional | INC value: If If |
amount | Object | Optional | Represents the value and currency of the transaction to be encoded in in the QR Code. |
amount.value | String | Optional | Amount of the transaction in COP (e.g., |
amount.currency | ENUM | Optional | Currency for the transaction. Must be |
tip | Object | Optional | An object to track if a tip is to be added to the value of the transaction such as for paying a restaurant bill. |
tip.tip_type | ENUM | Optional | Tip calculation method:
|
tip.tip_value | String | Optional | Required if |
tip.tip_percentage | String | Optional | Required if |
Example Request
Response Body
HTTP Status Code: 200 OK.
Returns the newly created QR Code and its associated metadata.
Example of Response
The QR Codes response includes the image in Base64 format. You can use any front-end library to convert it to a readable image for your audience.
The QR codes are visible in the dashboard for validation purposes.
The
idyou get back is theqr_code_id, which you will use in other endpoints.
Common Errors and Handling
HTTP Status Code | Meaning | Description |
|---|---|---|
400 Bad Request | Invalid Data | Required fields are missing or contain incorrect values. |
401 Unauthorized | Expired Token | The access token is invalid or has expired. |
403 Forbidden | Access Denied | The request is not authorized to validate the entity. |
500 Internal Server Error | Server Error | An unexpected error occurred while validating the entity. |
Best Practices
Verify that the
key_idandcustomer_idare valid and correctly associated.Use the
channel_presentationfield to specify how and where the QR is displayed.Use the
qr_code_referenceto track the QR Code against incoming PaymentsIf an amount is included, make sure to include the
vatandincobjects with the appropriate structure and types.