Skip to main content
On this page

This guide explains how to offer Bre-B with the DEUNA Payment Widget. The shopper pays from their bank app with a QR code or a Bre-B key, and the widget updates automatically when DEUNA confirms the payment.

Prerequisites#

Before you start, make sure you have:

  1. The Bre-B connection enabled for your merchant. Contact your DEUNA account team.
  2. An order token for an order in COP.
  3. The DEUNA SDK integrated in your project.
  4. Reviewed the Payment Widget documentation for your platform.

Payment method configuration#

Display Bre-B in the Payment Widget by passing its configuration in the paymentMethods parameter:

JSON
[
  {
    "paymentMethod": "bank_transfer",
    "processors": ["breb"]
  }
]

When paymentMethods contains only Bre-B, the widget opens directly on Bre-B.

Payment Widget — Web#

JavaScript
DeunaSDK.initPaymentWidget({
  orderToken: 'YOUR_ORDER_TOKEN',
  paymentMethods: [
    {
      paymentMethod: 'bank_transfer',
      processors: ['breb'],
    },
  ],
  callbacks: { ... },
});

Payment Widget — Android#

Kotlin
// MODAL
deunaSDK.initPaymentWidget(
    context = context,
    orderToken = orderToken,
    callbacks = PaymentWidgetCallbacks().apply { ... },
    paymentMethods = listOf(
        mapOf(
            "paymentMethod" to "bank_transfer",
            "processors" to listOf("breb")
        )
    )
)

// EMBEDDED
PaymentWidgetConfiguration(
    orderToken = orderToken,
    paymentMethods = listOf(
        mapOf(
            "paymentMethod" to "bank_transfer",
            "processors" to listOf("breb")
        )
    ),
    callbacks = PaymentWidgetCallbacks().apply { ... }
)

Payment Widget — iOS#

Swift
// MODAL
deunaSDK.initPaymentWidget(
  orderToken: "YOUR_ORDER_TOKEN",
  callbacks: ...,
  paymentMethods: [
    [
      "paymentMethod": "bank_transfer",
      "processors": ["breb"]
    ]
  ]
)

// EMBEDDED
DeunaWidget(
  deunaSDK: deunaSDK,
  configuration: PaymentWidgetConfiguration(
    orderToken: "YOUR_ORDER_TOKEN",
    callbacks: PaymentWidgetCallbacks(
      onSuccess: { order in },
      onError: { error in },
      onEventDispatch: { event, data in }
    ),
    paymentMethods: [
      [
        "paymentMethod": "bank_transfer",
        "processors": ["breb"]
      ]
    ]
  )
)

Payment Widget — React Native#

JavaScript
deunaSDK.initPaymentWidget({
  orderToken: 'YOUR_ORDER_TOKEN',
  paymentMethods: [
    {
      paymentMethod: 'bank_transfer',
      processors: ['breb'],
    },
  ],
  callbacks: { ... },
});

Choose the payment options#

Choose whether your shoppers pay with a QR code, a key, or can pick either one. The variant applies to every Bre-B payment of your merchant.

VariantBefore payingAfter clicking Pay
qr (default)A Bre-B card explains that a QR code is generated.The QR code, a countdown, instructions, and a Descargar código QR (download QR code) button.
keyA Bre-B card explains that a Bre-B key is generated.The LLAVE (key) with a copy button, a countdown, and instructions to enter the key and the exact amount.
key_qrTwo options: Llave Bre-B (selected by default) and QR Bre-B.The QR code or the key, depending on the option the shopper selected.

Set the variant in widgets_general_config.behavior.payment_methods.apms.breb.variant of your checkout configuration. If you do not set it, shoppers see the QR code.

curl --request PATCH \
  --url https://api.sandbox.deuna.io/api/v1/merchants/{merchant_id}/checkout/configurations \
  --header 'Authorization: Bearer YOUR_MERCHANT_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "widgets_general_config": {
      "behavior": {
        "payment_methods": {
          "apms": {
            "breb": {
              "variant": "key_qr"
            }
          }
        }
      }
    }
  }'

For production, replace https://api.sandbox.deuna.io with https://api.deuna.io. Test the change in sandbox before applying it in production. The variant is read when the widget loads, so new widgets use the new value.

What the shopper sees after paying#

  • QR code: the shopper scans the QR code from the Bre-B section of their bank app, checks the amount, and confirms. They can also download the QR code to scan it later from another device.
  • Key: the shopper copies the key, enters it with the exact order amount in the Bre-B section of their bank app, and confirms.
  • Countdown: the QR code or key is valid until the countdown ends.
  • Change payment method: the shopper can go back and choose another payment method.

The screen updates automatically when DEUNA confirms the payment.

Verify the payment#

  • Successful payment: the widget calls onSuccess with the order. Confirm the final status with your webhooks before fulfilling the order.
  • Payment not completed: if the shopper does not pay before the countdown ends, the payment expires and the widget reports an error through onError.
  • Events: use onEventDispatch to follow the shopper's progress, for example when they cancel or change the payment method.

Customization#

The Bre-B screens support the standard widget customizations through CustomStyle, such as the merchant logo, the payment method selector title, and Powered by DEUNA. See Customize the UI/UX of widgets using CustomStyles.

Limitations#

  • Available in Colombia only and supports COP only.
  • With the key option, a payment for a different amount than the order is not processed.
  • The payment option is set per merchant through the variant; it cannot be set per order.
  • Recurring payments are not supported in this flow.