> ## 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.

# PayOut API

> API for initiating PayOut transactions, including supported banks, account types, and preauthorization rules.

# PayOut API

Use this API to initiate disbursements to bank accounts and supported wallets.

**Supported methods by country:**

* **Colombia**: `BANK_TRANSFER`, `TRANSFIYA`, `TUMIPAY`, `BREB` (see [Bre-B integration](https://docs.v2.topup.com.co/docs/co/breb.md))
* **Peru**: `BANK_TRANSFER`
* **Mexico**: `SPEI`
* **Guatemala**: `BANK_TRANSFER`
* **Honduras**: `BANK_TRANSFER`

For country-specific details (banks, account types, document types, limits), see the [Colombia](https://docs.v2.topup.com.co/docs/co/introduction.md), [Peru](https://docs.v2.topup.com.co/docs/pe/introduction.md), [Mexico](https://docs.v2.topup.com.co/docs/mx/introduction.md), [Guatemala](https://docs.v2.topup.com.co/docs/gt/introduction.md), and [Honduras](https://docs.v2.topup.com.co/docs/hn/introduction.md) configuration pages.

## Transaction Flow

The PayOut process follows a clear sequence of interactions between different participants:

```mermaid theme={null}
sequenceDiagram
    participant M as Merchant
    participant T as TumiPay API
    participant TF as Transfiya
    participant B as Customer Bank
    participant C as Customer

    M->>T: 1. Create PayOut transaction
    T->>T: 2. Validate request & generate ticket
    T->>M: 3. Return ticket & PENDING status
    T->>TF: 4. Initiate bank transfer
    TF->>TF: 5. Debit funds from merchant account
    TF->>B: 6. Credit funds to customer account
    B->>C: 7. Credit funds to customer's account
    TF->>T: 8. Notify transfer COMPLETED
    T->>T: 9. Update internal balances
    T->>M: 10. Send webhook with final status
```

## Preauthorization Rules

Preauthorization, limits and validations depend on each country and method. Refer to the country pages for current values and processes.

## Endpoints

### POST Initiate a PayOut Transaction

> [card] /api/v1/payout
>
> This endpoint allows you to perform dispersions using methods like TumiPay Wallet and Bank Transfer.
> Transactions are processed asynchronously, ensuring efficiency and reliability.

#### Request Headers

**Token-Top** `string` *required*

Secret token for authorization

**Authorization** `string` *required*

Authorization key for access

#### Request Body

**payment\_method** `string` *required*

Specifies the payment method. See country-specific options:

* [Colombia](https://docs.v2.topup.com.co/docs/co/introduction.md#payment-methods)
* [Peru](https://docs.v2.topup.com.co/docs/pe/introduction.md#payment-methods)
* [Mexico](https://docs.v2.topup.com.co/docs/mx/introduction.md#payment-methods)

**reference** `string` *required*

Unique reference for the transaction

**amount** `number` *required*

Amount to be transferred

**currency** `string` *required*

Currency for the transaction. Use `COP` for Colombia, `PEN` for Peru, `MXN` for Mexico

**country** `string` *required*

Two-letter country code. Possible values: "CO", "PE", "MX"

**ipn\_url** `string` *required*

Webhook URL to receive transaction status updates

**customer\_data** `object` *required*

**Customer data object**

**legal\_doc** `string` *required*

Customer ID number

**legal\_doc\_type** `string` *required*

Type of document. See country-specific types:

* [Colombia](https://docs.v2.topup.com.co/docs/co/introduction.md#document-types)
* [Peru](https://docs.v2.topup.com.co/docs/pe/introduction.md#document-types)
* [Mexico](https://docs.v2.topup.com.co/docs/mx/introduction.md#document-types)

**phone\_code** `string` *required*

Country code for the customer's phone number

**phone\_number** `string` *required*

Customer's phone number without country code

**email** `string` *required*

Customer email address

**full\_name** `string` *required*

Full name of the customer

**bank** `string` *required*

Destination bank

**account\_number** `string` *required*

Account number of the customer

**account\_type** `string` *required*

Type of destination account. See country-specific types:

* [Colombia](https://docs.v2.topup.com.co/docs/co/introduction.md#account-types)
* [Peru](https://docs.v2.topup.com.co/docs/pe/introduction.md#account-types)
* [Mexico](https://docs.v2.topup.com.co/docs/mx/introduction.md#account-types)

#### Response

**code** `string` *required*

Response code (see [Error Codes](#error-codes))

**status** `string` *required*

Status of the transaction (e.g., "SUCCESS")

**message** `string`

Transaction result message

**data** `object` *required*

**Transaction data object**

**ticket** `string`

Unique identifier for the payout

**date** `string`

Timestamp of the transaction

**transaction** `object`

**Transaction details**

**reference** `string`

Client reference identifier

**amount** `number`

Transaction amount

**currency** `string`

Currency code

**payment\_method** `string`

Selected payment method

> [tab] cURL
>
> ```bash theme={null}
> curl --request POST 'https://api-empresas.uat.topup.com.co/production/api/v1/payout' \
> --header 'Token-Top: your_auth_token' \
> --header 'Authorization: Basic your_auth_key' \
> --header 'Content-Type: application/json' \
> --data-raw '{
>     "payment_method": "BANK_TRANSFER",
>     "reference": "tu-referencia",
>     "amount": 1000,
>     "currency": "COP",
>     "country": "CO",
>     "ipn_url": "http://example.com/tu-webhook",
>     "customer_data": {
>         "legal_doc": "1002184990",
>         "legal_doc_type": "CC",
>         "phone_code": "57",
>         "phone_number": "3003540831",
>         "email": "johndoe@email.com",
>         "full_name": "John Doe",
>         "bank": "EXAMPLE_BANK",
>         "account_number": "3990000011",
>         "account_type": "AHORRO"
>     }
> }'
> ```

> [tab] JavaScript
>
> ```javascript theme={null}
> // Using fetch API
> const response = await fetch('https://api-empresas.uat.topup.com.co/production/api/v1/payout', {
>   method: 'POST',
>   headers: {
>     'Token-Top': 'your_auth_token',
>     'Authorization': 'Basic your_auth_key',
>     'Content-Type': 'application/json'
>   },
>   body: JSON.stringify({
>     payment_method: 'BANK_TRANSFER',
>     reference: '3cNPNGbX7meiMppXzVz7g781ysektqq5X',
>     amount: 1000,
>     currency: 'COP',
>     country: 'CO',
>     ipn_url: 'http://example.com/tu-webhook',
>     customer_data: {
>       legal_doc: '1002184990',
>       legal_doc_type: 'CC',
>       phone_code: '57',
>       phone_number: '3003540831',
>       email: 'johndoe@email.com',
>       full_name: 'John Doe',
>       bank: 'EXAMPLE_BANK',
>       account_number: '3990000011',
>       account_type: 'AHORRO'
>     }
>   })
> });
> const data = await response.json();
> ```

> [tab] Python
>
> ```python theme={null}
> import requests
> import json
>
> url = "https://api-empresas.uat.topup.com.co/production/api/v1/payout"
>
> headers = {
>     'Token-Top': 'your_auth_token',
>     'Authorization': 'Basic your_auth_key',
>     'Content-Type': 'application/json'
> }
>
> payload = {
>     "payment_method": "BANK_TRANSFER",
>     "reference": "tu-referencia",
>     "amount": 1000,
>     "currency": "COP",
>     "country": "CO",
>     "ipn_url": "http://example.com/tu-webhook",
>     "customer_data": {
>         "legal_doc": "1002184990",
>         "legal_doc_type": "CC",
>         "phone_code": "57",
>         "phone_number": "3003540831",
>         "email": "johndoe@email.com",
>         "full_name": "John Doe",
>         "bank": "EXAMPLE_BANK",
>         "account_number": "3990000011",
>         "account_type": "AHORRO"
>     }
> }
>
> response = requests.post(url, headers=headers, data=json.dumps(payload))
> result = response.json()
> ```

> [tab] PHP
>
> ```php theme={null}
> <?php
> $url = "https://api-empresas.uat.topup.com.co/production/api/v1/payout";
>
> $headers = array(
>     'Token-Top: your_auth_token',
>     'Authorization: Basic your_auth_key',
>     'Content-Type: application/json'
> );
>
> $payload = array(
>     "payment_method" => "BANK_TRANSFER",
>     "reference" => "tu-referencia",
>     "amount" => 1000,
>     "currency" => "COP",
>     "country" => "CO",
>     "ipn_url" => "http://example.com/tu-webhook",
>     "customer_data" => array(
>         "legal_doc" => "1002184990",
>         "legal_doc_type" => "CC",
>         "phone_code" => "57",
>         "phone_number" => "3003540831",
>         "email" => "johndoe@email.com",
>         "full_name" => "John Doe",
>         "bank" => "DAVIPLATA",
>         "account_number" => "3990000011",
>         "account_type" => "AHORRO"
>     )
> );
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, $url);
> curl_setopt($ch, CURLOPT_POST, 1);
> curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
> curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
>
> $response = curl_exec($ch);
> curl_close($ch);
>
> $result = json_decode($response, true);
> ?>
> ```

### Examples for Mexico

#### SPEI

*Disbursement via SPEI to a CLABE account. The 18-digit CLABE uniquely identifies the destination bank and account.*

```bash theme={null}
curl --request POST 'https://api-empresas.uat.topup.com.co/production/api/v1/payout' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payment_method": "SPEI",
    "reference": "mx-payout-ref-001",
    "amount": 500.00,
    "currency": "MXN",
    "country": "MX",
    "ipn_url": "https://your-server.com/webhook",
    "customer_data": {
        "legal_doc": "CURP12345678901234",
        "legal_doc_type": "RFC",
        "phone_code": "52",
        "phone_number": "5512345678",
        "email": "customer@example.com",
        "full_name": "Juan Pérez",
        "bank": "BBVA_MEXICO",
        "account_type": "CLABE",
        "account_number": "1234567890",
        "clabe_number": "012180012345678909"
    }
}'
```

> [!NOTE]
>
> `account_number` must be the account segment of `clabe_number` (10 to 12 digits), not the full CLABE. See [CLABE validation](https://docs.v2.topup.com.co/docs/mx/payout.md#clabe-validation).

### Error Codes

| Code | Meaning |
| - | - |
| **01** | Operation successful |
| **00** | Validation error or processing failed |

### Supported Banks

For a complete list of supported banks for PayOut transactions, please refer to the country-specific documentation:

* [Colombia - Supported Banks](https://docs.v2.topup.com.co/docs/co/introduction.md#banks)
* [Peru - Supported Banks](https://docs.v2.topup.com.co/docs/pe/introduction.md#banks)
* [Guatemala - Supported Banks](https://docs.v2.topup.com.co/docs/gt/introduction.md#banks)
* Mexico - SPEI transfers route via the national CLABE system; no specific bank selection is required

***

### Valid Account Types

The following account types are valid for processing transactions through this API.

| **Account Type** | **Country** | **Description** |
| - | - | - |
| **AHORRO** | Colombia, Peru, Guatemala, Honduras | Savings account |
| **CORRIENTE** | Colombia, Peru, Guatemala, Honduras | Current or checking account |
| **WALLET** | Colombia, Peru | Digital wallet |
| **CLABE** | Mexico | 18-digit standardized banking code (SPEI transfers) |
| **SPEI** | Mexico | SPEI transfer account |

Always use the corresponding account type in your API requests to ensure proper processing of the transaction.

***

### Common Bank Response Messages for "REJECTED" Status

When a payout transaction is rejected, the **`top_response_message`** field in the webhook payload contains a message provided by the bank explaining the reason for the rejection.

| **Response Message** |
| - |
| **Transferencia exitosa** |
| **Esta cuenta está inactiva/bloqueada** |
| **La cuenta o Nit no corresponden** |
| **El número de cuenta no existe** |
| **El número de cuenta no es válido** |
| **Cuenta no autorizada** |
| **El Nit no es válido** |
| **El producto de destino no existe** |
| **Excede el tope saldo de la cuenta destino** |

These messages should be **monitored and logged** to understand the reason for the rejection and take any necessary corrective actions.

***

## Response Examples

```json theme={null}
{
    "code": "01",
    "status": "SUCCESS",
    "message": "Operacion exitosa",
    "data": {
        "ticket": "19kazMPNue2fOIp",
        "date": "2025-10-16 00:58:54",
        "transaction": {
            "reference": "3cNPNGbX7meiMppXzVz7g781ysektqq5X",
            "amount": 1000,
            "currency": "COP",
            "payment_method": "BANK_TRANSFER"
        }
    }
}
```

```json Error Response theme={null}
{
  "code": "00",
  "status": "ERROR",
  "error": "VALIDATION_ERROR",
  "message": "El banco especificado no existe"
}
```


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