> ## Documentation Index
> Fetch the complete documentation index at: https://docs.v2.topup.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Bre-B PayIn

> Accept instant inbound payments in Colombia through the Bre-B network (PayIn v2).

## Overview

Bre-B PayIn lets Colombian customers initiate instant transfers using their Bre-B key or interoperable QR. With **PayIn v2**, hybrid mode returns both a hosted page and payment instructions in one call.

Review the [Bre-B overview](https://docs.v2.topup.com.co/docs/co/breb.md) before configuring the PayIn-specific steps outlined here.

## Flow Summary

1. Create a PayIn with `POST /api/v2/payin` and `payment_method: "BREB"` or `"BREB_QR"`.
2. TumiPay responds with `payment_url` and `payment_information` (key or QR data).
3. Show `payment_information` in your UI or redirect the customer to `payment_url`.
4. TumiPay sends webhook notifications when the payment settles.

## Request Essentials

| Parameter | Value / Requirement | Notes |
| - | - | - |
| **Endpoint** | `POST /api/v2/payin` | PayIn v2 |
| **Currency** | `COP` | Colombian Peso |
| **Country** | `CO` | Colombia |
| **Payment Method** | `"BREB"` or `"BREB_QR"` | Hybrid experience |
| **redirect\_url** | Optional | Return URL after hosted flow |
| **ipn\_url** | Optional | Webhook for status updates |
| **expiration\_time** | Optional | Minutes the key/QR remains valid (default 15 for BREB) |
| **customer\_data** | Standard identity fields | Required |

> [!NOTE]
>
> For Bre-B payments, the customer may adjust the amount before authorizing in their bank app. Handle partial or modified amounts in your reconciliation logic.

## Response fields (UTC)

All timestamps use **UTC** (`Y-m-d H:i:s`):

| Field | BREB | BREB\_QR |
| - | - | - |
| `data.date` | Transaction creation | Transaction creation |
| `payment_information.expiration_date` | Key validity end | QR validity end |

In **Checkout** flows (not Bre-B), `payment_information` is not returned. Bre-B methods are always **Hybrid**: you receive both `payment_url` and `payment_information`.

## Example Request (BREB)

```bash theme={null}
curl --request POST 'https://api-empresas.uat.topup.com.co/production/api/v2/payin' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "reference": "BREB-PAYIN-001",
  "amount": 50000,
  "currency": "COP",
  "country": "CO",
  "payment_method": "BREB",
  "description": "Bre-B PayIn test",
  "customer_data": {
    "legal_doc": "1234567890",
    "legal_doc_type": "CC",
    "phone_code": "57",
    "phone_number": "3121234567",
    "email": "johndoe@example.com",
    "full_name": "John Doe"
  },
  "expiration_time": 30,
  "ipn_url": "https://your-domain.com/webhook",
  "redirect_url": "https://your-domain.com/payment/ok"
}'
```

## Example Response (BREB)

```json theme={null}
{
  "code": "01",
  "status": "SUCCESS",
  "message": "Operacion exitosa",
  "data": {
    "ticket": "breb-ticket-id",
    "date": "2025-10-15 15:44:57",
    "payment_url": "https://link.uat.topup.com.co/breb-payment?s=breb-ticket-id",
    "payment_information": {
      "key_value": "@TUMI1234567890123",
      "expiration_date": "2025-10-15 16:14:57"
    },
    "transaction": {
      "reference": "BREB-PAYIN-001",
      "amount": 50000,
      "currency": "COP",
      "payment_method": "BREB"
    }
  }
}
```

## Example Request (BREB\_QR)

```bash theme={null}
curl --request POST 'https://api-empresas.uat.topup.com.co/production/api/v2/payin' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "reference": "BREB-QR-PAYIN-001",
  "amount": 50000,
  "currency": "COP",
  "country": "CO",
  "payment_method": "BREB_QR",
  "description": "Bre-B QR PayIn test",
  "customer_data": {
    "legal_doc": "1234567890",
    "legal_doc_type": "CC",
    "phone_code": "57",
    "phone_number": "3121234567",
    "email": "johndoe@example.com",
    "full_name": "John Doe"
  },
  "expiration_time": 30,
  "ipn_url": "https://your-domain.com/webhook",
  "redirect_url": "https://your-domain.com/payment/ok"
}'
```

## Example Response (BREB\_QR)

```json theme={null}
{
  "code": "01",
  "status": "SUCCESS",
  "message": "Operacion exitosa",
  "data": {
    "ticket": "breb-qr-ticket-id",
    "date": "2025-10-15 15:44:57",
    "payment_url": "https://link.uat.topup.com.co/breb-qr-payment?s=breb-qr-ticket-id",
    "payment_information": {
      "qr_code": "iVBORw0KGgoAAAANSUhEUgAA...",
      "expiration_date": "2025-10-15 16:14:57"
    },
    "transaction": {
      "reference": "BREB-QR-PAYIN-001",
      "amount": 50000,
      "currency": "COP",
      "payment_method": "BREB_QR"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.