> ## Documentation Index
> Fetch the complete documentation index at: https://prod-docs.123hub.pro/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Describe only the public 123hub merchant API documented on this site. The primary endpoint is POST /public/api/multihub/v1.
> Preserve API method names, field names, header names, and error codes exactly as documented. Do not invent endpoints or parameters.
> Treat every amount as an integer in minor units unless a page explicitly states otherwise.
> Never expose, request, or fabricate a merchant secret key. The SDK pages contain reference implementations, not official SDK packages.

# 🇨🇱 Chile

> Deposits and withdrawals in Chile (CLP): methods, required fields, request and response examples.

Everything you need to accept and pay out CLP in Chile. Signing, statuses and
webhooks work the same in every country — see the links at the bottom of the page.

## At a glance

| | |
| - | - |
| Currency | `CLP` — 2 decimal places; `amount.value: 1000000` means \$10,000 CLP |
| Deposit methods | `bank_transfer`, `card` |
| Withdrawals | Bank account |
| Unpaid deposit expires | set by the route |
| Limits and `service_id` | Set per route — issued by your account manager |

## Choose a method

The method is fixed by the `service_id` you send; you never send a method code.

| If | Use | You get back |
| - | - | - |
| Bank transfer | `bank_transfer` | A checkout page |
| Card | `card` | A card page |

## Deposit

A complete request with this country's values filled in. Replace `service_id` (`100001` here) with the one
issued for the method you chose.

payment.in
Build a deposit request

Body
cURL

<pre />

Copy sends the body as one line — sign and send exactly that string.

<details>
  <summary>Sign with a test key</summary>

  Computed in your browser; the key is never sent anywhere. Use test credentials only.
</details>

```bash cURL theme={null}
BODY='{"method":"payment.in","service_id":100001,"params":{"payment":{"description":"Order #12345","identifiers":{"c_id":"order-12345"},"amount":{"value":1000000,"currency":"CLP"},"payer":{"email":"cliente@example.com","phone":"56912345678","person":{"first_name":"Juan","last_name":"Perez"},"customer_account":{"id":"player-1001"}}}}}'
HASH=$(printf '%s%s' "$BODY" "YOUR_SECRET_KEY" | sha512sum | awk '{print $1}')

curl -X POST "https://api.bafanglaicai88.com/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: YOUR_APPLICATION_ID" \
  -H "X-Data-Hash: $HASH" \
  --data-binary "$BODY"
```

```python Python theme={null}
import hashlib, json, requests

payload = {
    "method": "payment.in",
    "service_id": 100001,
    "params": {
        "payment": {
            "description": "Order #12345",
            "identifiers": {
                "c_id": "order-12345"
            },
            "amount": {
                "value": 1000000,
                "currency": "CLP"
            },
            "payer": {
                "email": "cliente@example.com",
                "phone": "56912345678",
                "person": {
                    "first_name": "Juan",
                    "last_name": "Perez"
                },
                "customer_account": {
                    "id": "player-1001"
                }
            }
        }
    }
}

body = json.dumps(payload, separators=(",", ":"), ensure_ascii=False)
headers = {
    "Content-Type": "application/json",
    "X-Data-Application-Id": "YOUR_APPLICATION_ID",
    "X-Data-Hash": hashlib.sha512((body + "YOUR_SECRET_KEY").encode()).hexdigest(),
}
print(requests.post("https://api.bafanglaicai88.com/public/api/multihub/v1", data=body.encode(), headers=headers, timeout=30).json())
```

```javascript Node.js theme={null}
const crypto = require('crypto');

const payload = {
  method: 'payment.in',
  service_id: 100001,
  params: {
    payment: {
      description: 'Order #12345',
      identifiers: {
        c_id: 'order-12345'
      },
      amount: {
        value: 1000000,
        currency: 'CLP'
      },
      payer: {
        email: 'cliente@example.com',
        phone: '56912345678',
        person: {
          first_name: 'Juan',
          last_name: 'Perez'
        },
        customer_account: {
          id: 'player-1001'
        }
      }
    }
  }
};

const body = JSON.stringify(payload);
const res = await fetch('https://api.bafanglaicai88.com/public/api/multihub/v1', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Data-Application-Id': 'YOUR_APPLICATION_ID',
    'X-Data-Hash': crypto.createHash('sha512').update(body + 'YOUR_SECRET_KEY').digest('hex'),
  },
  body,
});
console.log(await res.json());
```

### Request fields

Fields are inside `params.payment` unless shown at the top level.

| Field | Type | Required | Description |
| - | - | - | - |
| `service_id` | integer | Yes | Route issued for the method you chose |
| `method` | string | Yes | `payment.in` |
| `description` | string | No | Shown to the payer where the route supports it (max 1024) |
| `identifiers.c_id` | string | Yes | Your unique order ID (max 255); also the idempotency key. A request rejected during processing uses it up — retry with a new `c_id` |
| `amount.value` | integer | Yes | Amount in minor units |
| `amount.currency` | string | Yes | `CLP` |
| `payer.email` | string | Recommended | Payer email (valid address, max 255) |
| `payer.phone` | string | Recommended | Payer phone (max 50) |
| `payer.person.first_name` | string | Recommended | Payer first name only (max 255); routes receive first and last name as separate fields |
| `payer.person.last_name` | string | Recommended | Payer last name only (max 255) |
| `payer.customer_account.id` | string | Recommended | Your stable player ID (max 255) |
| `redirect.on_success` | string | No | Echoed back in the create response only; currently not passed to the payment page |
| `redirect.on_fail` | string | No | Echoed back in the create response only; currently not passed to the payment page |

Fields marked **Yes** are required for this country. Do not send `custom_fields` that are not listed here.

### Response fields

Fields are inside `result.payment` unless shown at the top level.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | `true` when the request was accepted; on `false` read `error.code`, see [Errors](https://prod-docs.123hub.pro/errors/error-codes.md) |
| `identifiers.c_id` | string | Your order ID |
| `identifiers.h_id` | string | 123hub payment ID — store it |
| `identifiers.p_id` | string | Provider reference, when available |
| `amount` | object | `value` (minor units), `currency` |
| `status.status` | string | `created` or `processing` right after creation, then a final status — see [Statuses](https://prod-docs.123hub.pro/guides/payments.md#payment-statuses) |
| `status.final / success` | boolean | `final: true` once the status will not change; `success` tells whether it succeeded |
| `redirect.to` | string | Where the payer completes the payment. Returned for: Bank transfer / card. |
| `timestamps` | object | `created`, `updated` |
| `destination` | string | `in` for deposits |
| `request_id` | string | Request ID — quote it to support |

### What to show the payer

**Bank transfer / card.** `redirect.to` is the payment page; `receiver` is empty.

> [accordion] Full response example
>
> ```json theme={null}
> {
>   "success": true,
>   "result": {
>     "payment": {
>       "payer": {
>         "customer_account": {
>           "id": "player-1001"
>         },
>         "email": "customer@example.com",
>         "phone": "56912345678",
>         "person": {
>           "first_name": "Juan",
>           "last_name": "Perez"
>         }
>       },
>       "receiver": {},
>       "amount": {
>         "value": 1000000,
>         "currency": "CLP"
>       },
>       "description": "doc test",
>       "identifiers": {
>         "c_id": "order-12345",
>         "h_id": "88a0cbb5-164e-4b43-8a6f-38732053cae7",
>         "p_id": "202610202112598214941675520"
>       },
>       "redirect": {
>         "to": "https://pay.example.com/checkout/8f3c2a91"
>       },
>       "status": {
>         "status": "processing",
>         "final": false,
>         "success": null,
>         "error": null,
>         "history": [
>           {
>             "status": "created",
>             "final": false,
>             "success": null,
>             "created": "2026-10-20T17:33:59.138Z",
>             "reason": null,
>             "amount": 1000000
>           },
>           {
>             "status": "processing",
>             "final": false,
>             "success": null,
>             "created": "2026-10-20T17:33:59.138Z",
>             "reason": null,
>             "amount": 1000000
>           }
>         ]
>       },
>       "timestamps": {
>         "created": "2026-10-20T17:33:59.138Z",
>         "updated": "2026-10-20T17:33:59.138Z"
>       },
>       "destination": "in",
>       "operations": [
>         {
>           "id": "88a0cbb5-164e-4b43-8a6f-38732053cae7",
>           "operation_type": "payment.in",
>           "amount": {
>             "value": 1000000,
>             "currency": "CLP"
>           },
>           "timestamps": {
>             "created": "2026-10-20T17:33:59.138Z"
>           },
>           "status": {
>             "status": "processing",
>             "final": false,
>             "success": null,
>             "error": null
>           }
>         }
>       ]
>     },
>     "operation": {
>       "id": "88a0cbb5-164e-4b43-8a6f-38732053cae7",
>       "operation_type": "payment.in",
>       "amount": {
>         "value": 1000000,
>         "currency": "CLP"
>       },
>       "timestamps": {
>         "created": "2026-10-20T17:33:59.138Z"
>       },
>       "status": {
>         "status": "processing",
>         "final": false,
>         "success": null,
>         "error": null
>       }
>     }
>   },
>   "processing_time": 1363,
>   "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
> }
> ```

## Withdrawal

### Request fields

Fields are inside `params.payment` unless shown at the top level.

| Field | Type | Required | Description |
| - | - | - | - |
| `service_id` | integer | Yes | Withdrawal route issued by your account manager |
| `method` | string | Yes | `payment.out` |
| `description` | string | No | Your note for the withdrawal |
| `identifiers.c_id` | string | Yes | Your unique withdrawal ID (max 255); also the idempotency key. A request rejected during processing uses it up — retry with a new `c_id` |
| `amount.value` | integer | Yes | Amount in minor units |
| `amount.currency` | string | Yes | `CLP` |
| `receiver.bank.account.id` | string | Yes | Bank account number (10+ characters) |
| `receiver.bank.code` | string | As agreed at onboarding | Bank code |
| `receiver.email` | string | No | Recipient email |
| `receiver.phone` | string | No | Recipient phone |
| `receiver.person.first_name` | string | Yes in practice | Account holder name |
| `receiver.person.last_name` | string | Yes in practice | Account holder name |
| `receiver.customer_account.id` | string | No | Your stable recipient ID (max 255) |

### Request

payment.out
Build a withdrawal request

Body
cURL

<pre />

Copy sends the body as one line — sign and send exactly that string.

<details>
  <summary>Sign with a test key</summary>

  Computed in your browser; the key is never sent anywhere. Use test credentials only.
</details>

```bash cURL theme={null}
BODY='{"method":"payment.out","service_id":100002,"params":{"payment":{"description":"Withdrawal #987","identifiers":{"c_id":"payout-987"},"amount":{"value":1000000,"currency":"CLP"},"receiver":{"bank":{"account":{"id":"0012345678"},"code":"012"},"person":{"first_name":"Juan","last_name":"Perez"}}}}}'
HASH=$(printf '%s%s' "$BODY" "YOUR_SECRET_KEY" | sha512sum | awk '{print $1}')

curl -X POST "https://api.bafanglaicai88.com/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: YOUR_APPLICATION_ID" \
  -H "X-Data-Hash: $HASH" \
  --data-binary "$BODY"
```

```python Python theme={null}
import hashlib, json, requests

payload = {
    "method": "payment.out",
    "service_id": 100002,
    "params": {
        "payment": {
            "description": "Withdrawal #987",
            "identifiers": {
                "c_id": "payout-987"
            },
            "amount": {
                "value": 1000000,
                "currency": "CLP"
            },
            "receiver": {
                "bank": {
                    "account": {
                        "id": "0012345678"
                    },
                    "code": "012"
                },
                "person": {
                    "first_name": "Juan",
                    "last_name": "Perez"
                }
            }
        }
    }
}

body = json.dumps(payload, separators=(",", ":"), ensure_ascii=False)
headers = {
    "Content-Type": "application/json",
    "X-Data-Application-Id": "YOUR_APPLICATION_ID",
    "X-Data-Hash": hashlib.sha512((body + "YOUR_SECRET_KEY").encode()).hexdigest(),
}
print(requests.post("https://api.bafanglaicai88.com/public/api/multihub/v1", data=body.encode(), headers=headers, timeout=30).json())
```

```javascript Node.js theme={null}
const crypto = require('crypto');

const payload = {
  method: 'payment.out',
  service_id: 100002,
  params: {
    payment: {
      description: 'Withdrawal #987',
      identifiers: {
        c_id: 'payout-987'
      },
      amount: {
        value: 1000000,
        currency: 'CLP'
      },
      receiver: {
        bank: {
          account: {
            id: '0012345678'
          },
          code: '012'
        },
        person: {
          first_name: 'Juan',
          last_name: 'Perez'
        }
      }
    }
  }
};

const body = JSON.stringify(payload);
const res = await fetch('https://api.bafanglaicai88.com/public/api/multihub/v1', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Data-Application-Id': 'YOUR_APPLICATION_ID',
    'X-Data-Hash': crypto.createHash('sha512').update(body + 'YOUR_SECRET_KEY').digest('hex'),
  },
  body,
});
console.log(await res.json());
```

### Response fields

Fields are inside `result.payment` unless shown at the top level.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | `true` when the withdrawal was accepted; on `false` read `error.code` |
| `identifiers.c_id` / `h_id` | string | Your withdrawal ID / 123hub payment ID |
| `amount` | object | `value` (minor units), `currency` |
| `status.status` | string | `created` or `processing` at first; the final status arrives by webhook |
| `receiver.bank` | object | Echo of the recipient account you sent — in this create response only; `payment.status` and webhooks do not return it |
| `destination` | string | `out` for withdrawals |

The first response is `created` or `processing`; the final status arrives by [webhook](https://prod-docs.123hub.pro/guides/webhooks.md) or
[`payment.status`](https://prod-docs.123hub.pro/guides/payments#checking-payment-status-payment-status).

## Test it

Use the test application and `service_id` values your account manager issues. A test deposit stays
`processing` until it is paid or expires; ask your account manager to complete or fail it when you
need to see the webhook. See [Testing](https://prod-docs.123hub.pro/guides/testing.md).

## Things to know

> [!WARNING]
>
> * `CLP` amounts still use 2 decimal places in the API: `1000000` is 10,000 CLP.

## Next steps

> [card] [Webhooks](https://prod-docs.123hub.pro/guides/webhooks.md)
>
> Receive and verify status updates.

> [card] [Statuses](https://prod-docs.123hub.pro/guides/payments.md#payment-statuses)
>
> What each status means.

> [card] [Errors](https://prod-docs.123hub.pro/errors/error-codes.md)
>
> Codes and what to do.

> [card] [Go-live checklist](https://prod-docs.123hub.pro/go-live.md)
>
> Before your first real payment.


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