Bre-B via Direct API
Integrate Bre-B as a payment method in your application via the DEUNA direct API, show the QR code or Bre-B key to the shopper, and verify the final payment status.
Overview
With Direct API, you create the Bre-B payment from your backend and display the payment instructions in your own checkout. The shopper pays from the Bre-B section of their bank or wallet app, and DEUNA confirms the result.
Through DEUNA, Bre-B is available as a bank transfer payment method (bank_transfer) with the processor breb.
Requirements:
- Available in Colombia
- Currency: COP (Colombia)
- The Bre-B connection enabled for your merchant, with your Movii credentials.
- The Movii webhook configured to notify DEUNA. See Configure the Movii webhook.
Configure the Movii webhook
DEUNA confirms Bre-B payments with the notifications that Movii sends. These notifications are configured by Movii, not in DEUNA.
- Ask your DEUNA account team for the DEUNA notification URL of each environment (sandbox and production).
- Ask Movii to register that URL as the webhook of your Movii account, in each environment.
- Confirm with Movii that the webhook is active before you start processing payments.
Purchase v2
V2 purchases perform the order creation and payment initiation in a single endpoint.
The Bre-B purchase process goes as follows:
- You call
POST v2/merchants/order/purchasewith the order information and the payment option (qrorkey). - DEUNA creates the order and a Bre-B key for it. With the
qroption, DEUNA also generates a QR code for that key. - DEUNA returns the payment instructions in the
next_actionnode. - You show the QR code or the key to the shopper, with a countdown.
- The shopper pays from the Bre-B section of their bank app.
- DEUNA receives the confirmation from Movii and updates the payment status.
Integrate Bre-B by API
1. Make a Bre-B purchase
Make a request to the V2 Purchase endpoint.
To make a Bre-B purchase with DEUNA, the V2 payload must contain:
| Field | Description | Values |
|---|---|---|
payment_source.method_type | Payment method type. | bank_transfer |
payment_source.processor | Bre-B processor. | breb |
payment_source.payment_method | What the shopper sees. If you do not send it, DEUNA uses key. | qr, key |
order | The order data, in COP. | — |
payment_method | What DEUNA returns | Recommended for |
|---|---|---|
qr | A QR code to scan from the bank app. | Shoppers who pay from a phone different from the device where they check out, such as a desktop browser. |
key | A Bre-B key to copy and enter in the bank app, together with the amount. | Shoppers who check out and pay on the same phone. |
If the shopper can choose, show both options in your checkout and send the one the shopper selects.
📘 All amounts must be expressed in cents. Bre-B does not accept cents, so the amount must be a multiple of 100. Example: COP 4.000 = 400000
Request example
{
"order_type": "DEUNA_CHECKOUT",
"payer_info": {
"email": "shopper@example.com"
},
"payment_source": {
"method_type": "bank_transfer",
"processor": "breb",
"payment_method": "qr"
},
"order": {
"order_id": "d81fe7bf-748b-4a7a-bc8f-7be98c8ae748",
"store_code": "all",
"currency": "COP",
"total_amount": 400000,
"items_total_amount": 400000,
"sub_total": 400000,
"items": [
{
"id": "1",
"name": "Cinema ticket",
"description": "Standard ticket",
"total_amount": {
"amount": 400000,
"currency": "COP",
"currency_symbol": "$"
},
"unit_price": {
"amount": 400000,
"currency": "COP",
"currency_symbol": "$"
},
"quantity": 1
}
]
}
}2. Show the payment instructions
After the purchase is initiated, the API responds with the payment in pending status and the payment instructions in the authorization_bank_transfer node.
| Field | qr | key |
|---|---|---|
token | Bre-B key of the order | Bre-B key of the order |
reference | QR code identifier | Bre-B key of the order |
qr | QR code image (Base64 PNG) | Not returned |
expiration_date | Date and time until which the shopper can pay | Same |
- Show the payment instructions with a countdown until
expiration_date:- QR code (
qr): render the image fromqr. The shopper scans it from the Bre-B section of their bank app, checks the amount, and confirms. Offer a button to download the QR code so the shopper can scan it from another device. - Key (
key): show the key fromtokenwith a copy button, and the exact order amount. The shopper enters the key and the exact amount in the Bre-B section of their bank app, and confirms.
- QR code (
- Let the shopper go back and choose another payment method.
- Retrieve the order to confirm the final payment status after DEUNA processes the confirmation.
Response example — QR code
{
"order_type": "DEUNA_CHECKOUT",
"order_token": "db3fc147-2a4e-460f-a874-f6f79b1e651c",
"order": {
"order_id": "d81fe7bf-748b-4a7a-bc8f-7be98c8ae748",
"currency": "COP",
"total_amount": 400000,
"status": "pending",
"payment": {
"data": {
"status": "pending",
"method_type": "bank_transfer",
"processor": "breb",
"external_transaction_id": "@DEUNA7K2Q9XB4M1",
"next_action": {
"action": "authorization_bank_transfer",
"authorization_bank_transfer": {
"token": "@DEUNA7K2Q9XB4M1",
"reference": "000123",
"qr": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAGBCAIAAAAPO5pzAAA...",
"expiration_date": "2026-12-03T15:15:00Z"
}
}
}
}
}
}Response example — Key
"next_action": {
"action": "authorization_bank_transfer",
"authorization_bank_transfer": {
"token": "@DEUNA7K2Q9XB4M1",
"reference": "@DEUNA7K2Q9XB4M1",
"expiration_date": "2026-12-03T15:15:00Z"
}
}3. Verify the payment
Read the status in order.payment.data.status, from your webhooks or by retrieving the order. Confirm the final status with your webhooks before fulfilling the order.
payment.data.status | Final | Meaning |
|---|---|---|
pending | No | Waiting for the shopper to pay, or payment still being confirmed by Movii. |
processed | Yes | Payment confirmed. Fulfil the order. |
expired | Yes | The shopper did not pay before expiration_date. Create a new purchase if the shopper wants to try again. |
payment.data.external_transaction_id contains the Bre-B key of the order (for example, @DEUNA7K2Q9XB4M1). It is assigned when the purchase is created and does not change. Use it for support and reconciliation.
Testing
To test Bre-B in the DEUNA sandbox (https://api.sandbox.deuna.io), you need a Movii test account.
- Request from Movii:
- Test credentials for your merchant.
- Access to the Movii test portal. The portal requires an authorized user and an access code provided by Movii.
- Ask Movii to configure the test webhook with the DEUNA sandbox notification URL. See Configure the Movii webhook.
- Use your DEUNA account in Admin to enable the test credentials and activate Bre-B in the sandbox.
- Create a Bre-B purchase in the sandbox.
Limitations
- The shopper must pay the exact order amount.
- Movii does not notify rejected payments; they stay
pendinguntil they expire. - Do not show a QR code or key after
expiration_date. If the shopper wants to try again, create a new purchase. - Refunds and recurring payments are not supported in this flow.