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

# Introduction

> Welcome to the 123hub Payment Gateway API documentation

# 123hub Payment Gateway API

123hub is a modern payment gateway that enables merchants to accept payments, process payouts, and manage their financial operations through a single API endpoint using method-based routing.

> [card] [Quick Start](https://prod-docs.123hub.pro/quickstart.md)
>
> Get up and running with your first API call in minutes

> [card] [Authentication](https://prod-docs.123hub.pro/authentication.md)
>
> Learn how to authenticate with Application ID and SHA512 hash

> [card] [Payments Guide](https://prod-docs.123hub.pro/guides/payments.md)
>
> Create deposits, withdrawals, and check payment status

> [card] [Webhooks](https://prod-docs.123hub.pro/guides/webhooks.md)
>
> Receive real-time notifications about payment events

## How It Works

All API interactions go through a **single POST endpoint** with method-based routing. Instead of different URLs for different operations, you specify the `method` field in the request body.

```json Example Request theme={null}
{
  "method": "payment.in",
  "service_id": 14701,
  "params": {
    "payment": {
      "description": "Order #12345",
      "identifiers": { "c_id": "12345" },
      "amount": { "value": 10000, "currency": "INR" },
      "payer": {
        "email": "customer@example.com",
        "person": { "first_name": "John", "last_name": "Doe" }
      }
    }
  }
}
```

```json Example Response theme={null}
{
  "success": true,
  "result": {
    "payment": {
      "amount": { "value": 10000, "currency": "INR" },
      "identifiers": { "c_id": "12345", "h_id": "1001" },
      "status": { "status": "created", "final": false, "success": null },
      "destination": "in",
      "service_id": 14701
    }
  },
  "request_id": "req_7f3a9b2c",
  "processing_time": 42
}
```

## Available Methods

| Method | Description |
| - | - |
| `payment.in` | Create an incoming payment (deposit) |
| `payment.out` | Create an outgoing payment (withdrawal/payout) |
| `payment.status` | Check the status of an existing payment |
| `payment.notification` | Re-send webhook notification for a payment |
| `balance.get` | Retrieve your account balance |
| `gateway.ping` | Health check to verify connectivity and authentication |

## Features

> [accordion] Multiple Payment Methods
>
> Accept payments via bank transfers, UPI, PIX, e-wallets, QR codes, mobile money, cash and cards. Multiple currencies supported (ARS, BIF, BOB, BRL, CLP, COP, ECS, INR, KRW, MXN, PEN, PKR, THB, TRY, UYU, VES).

> [accordion] Real-time Webhooks
>
> Receive instant notifications when payment status changes. Secure webhook delivery with SHA512 signatures and automatic retries.

> [accordion] Single Endpoint, Method-Based Routing
>
> All API operations go through one URL. The `method` field in the request body determines the action. Simplifies integration and reduces configuration overhead.

> [accordion] Unified Response Format
>
> Every response follows the same envelope structure with `success`, `result` or `error`, `request_id`, and `processing_time` fields. Successful responses return HTTP 200; most errors return HTTP 400, and a few use `403`, `404`, `409`, `429` or `5xx` (see [Error Codes](https://prod-docs.123hub.pro/errors/error-codes.md)).

## Base URL

All API requests are made to:

```
https://api.bafanglaicai88.com/public/api/multihub/v1
```

> [!NOTE]
>
> All requests use the `POST` method. The same endpoint is used for both test and production environments. Your credentials determine which environment is active.

## Authentication

Every request requires `X-Data-Application-Id` and `X-Data-Hash`. The timestamp
and nonce are an optional pair:

| Header | Description |
| - | - |
| `X-Data-Application-Id` | Your application ID (integer) |
| `X-Data-Hash` | SHA512 hex hash of `requestBody + secretKey` |
| `X-Data-Timestamp` | Optional current Unix timestamp in seconds |
| `X-Data-Nonce` | Optional unique nonce for this request |

See the [Authentication](https://prod-docs.123hub.pro/authentication.md) page for full details and code examples.

## Countries and Payment Methods

123hub accepts deposits and sends withdrawals in 16 countries: India, Pakistan, Thailand,
South Korea, Turkey, Brazil, Mexico, Argentina, Colombia, Peru, Chile, Ecuador, Uruguay, Venezuela,
Bolivia and Burundi.

> [card] [Find your country](https://prod-docs.123hub.pro/countries/overview.md)
>
> Each country page has its methods, required fields, ready-to-run requests and real response
> examples — nothing about other markets.

The method of a payment is defined by the `service_id` your account manager issues; you never send a
method code. Amounts are integers in minor units of the currency.

## Response Format

All responses follow a consistent envelope:

```json Success Response (HTTP 200) theme={null}
{
  "success": true,
  "result": { ... },
  "request_id": "req_7f3a9b2c",
  "processing_time": 42
}
```

```json Error Response (HTTP 400) theme={null}
{
  "success": false,
  "error": {
    "code": 6010,
    "message": "Payment does not exist",
    "details": null,
    "context": null
  },
  "request_id": "req_8d4b1e3f",
  "processing_time": 5
}
```

> [!WARNING]
>
> Successful responses return HTTP 200. Most error responses return HTTP 400; some use `403`, `404`, `409`, `429` or `5xx` — see [Error Codes](https://prod-docs.123hub.pro/errors/error-codes.md). Always check the `success` field in the response body to determine if the request succeeded.

## Need Help?

> [card] [API Reference](https://prod-docs.123hub.pro/api-reference/overview.md)
>
> Explore all available methods and parameters

> [card] [Support](mailto:support@123hub.pro)
>
> Contact our developer support team


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