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

# Payments Guide

> Learn how to create deposits, withdrawals, and check payment statuses with the 123hub API

# Payments Guide

This guide covers everything you need to know about creating and managing payments through the 123hub API. All payment operations use a single endpoint with method-based routing.

## Overview

The 123hub API provides three payment methods through a single endpoint:

| Method | Direction | Description |
| - | - | - |
| `payment.in` | Inbound | Customer pays to merchant (deposit) |
| `payment.out` | Outbound | Merchant pays to customer/vendor (withdrawal) |
| `payment.status` | Query | Check the current status of a payment |

### Endpoint

All requests are sent to a single endpoint:

```
POST /public/api/multihub/v1
```

Successful responses return **HTTP 200**. Most errors 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 the outcome.

### Authentication

Every request requires the application ID and exact-body hash. The timestamp
and nonce are optional and must be supplied together when used:

| Header | Description | Example |
| - | - | - |
| `X-Data-Application-Id` | Your application ID (integer) | `42` |
| `X-Data-Hash` | SHA-512 hash of the request body concatenated with your secret key | `a1b2c3d4...` |
| `X-Data-Timestamp` | Optional current Unix timestamp in seconds | `1716123456` |
| `X-Data-Nonce` | Optional unique nonce for this request | `req_01HX...` |

The hash is computed as:

```
sha512(requestBody + secretKey)
```

Where `requestBody` is the raw JSON string of the request body, and `secretKey` is your merchant secret key.
The optional timestamp and nonce are not part of the hash; see
[Replay protection](https://prod-docs.123hub.pro/authentication.md#replay-protection).

> [!WARNING]
>
> Keep your secret key secure. Never expose it in client-side code, public
> repositories, or browser requests. The hash must be computed server-side.

### Request Format

All requests follow the same envelope:

```json theme={null}
{
  "method": "payment.in | payment.out | payment.status",
  "service_id": 14701,
  "params": {
    "payment": { ... }
  }
}
```

| Field | Type | Required | Description |
| - | - | :-: | - |
| `method` | string | Yes | The operation to perform |
| `service_id` | integer | Yes\* | Routing identifier assigned per merchant. Determines the provider, payment method, currency, and direction. Required for `payment.in` and `payment.out` |
| `params` | object | Yes | Contains the `payment` object with operation-specific fields |

### Response Format

All responses follow a consistent envelope:

```json theme={null}
{
  "success": true,
  "result": {
    "payment": { ... }
  },
  "request_id": "req_abc123",
  "processing_time": 42
}
```

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Whether the operation succeeded |
| `result` | object | Present only on success; contains the `payment` object |
| `error` | object | Present only on failure; contains `code`, `message`, `details`, and `context` |
| `request_id` | string | Unique identifier for this request (useful for debugging) |
| `processing_time` | number | Server processing time in milliseconds |

***

## Identifiers

Every payment uses three identifiers that appear in the `identifiers` object:

| Identifier | Type | Description |
| - | - | - |
| `c_id` | string | **Client ID** -- your merchant reference. You provide this when creating a payment. Must be unique per payment, up to 255 characters, and contain at least one non-space character. It is stored exactly as sent (no trimming). |
| `h_id` | string | **Hub ID** -- system-assigned payment ID. Assigned automatically when the payment is created. |
| `p_id` | string | **Provider ID** -- the payment provider's transaction reference. Assigned when the payment reaches the provider. Returned for reconciliation only; it is not accepted as a status lookup key. |

When the route reports one, responses also carry `identifiers.utr` — a bank tracking reference
for reconciliation.

> [!NOTE]
>
> Use `c_id` as your primary reference for tracking payments. It is the key you
> control and should map to your internal order or transaction ID. Send `c_id`
> and `h_id` as JSON strings; numeric values are rejected with `1005`.

***

## Creating a Deposit (payment.in)

Use `payment.in` to create a deposit where a customer pays you.

**1. Build the request body**

Include the payment amount, currency, customer (payer) details, and your
unique `c_id`.

**2. Compute the authentication hash**

Compute `sha512(requestBody + secretKey)` and set it in the `X-Data-Hash`
header.

**3. Send the request**

POST to `/public/api/multihub/v1` and handle the response.

**4. Redirect the customer**

If the response includes a `redirect.to` URL, redirect the customer to
complete payment.

### Request

```bash cURL theme={null}
BODY='{"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","phone":"9876543210","person":{"first_name":"John","last_name":"Doe"},"customer_account":{"id":"ACC123"}},"client":{"language":"EN","country":"IN"}}}}'
HASH=$(printf '%s%s' "$BODY" "YOUR_SECRET_KEY" | sha512sum | awk '{print $1}')
TIMESTAMP=$(date +%s)
NONCE=$(uuidgen | tr '[:upper:]' '[:lower:]')

curl -X POST "https://api.bafanglaicai88.com/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 42" \
  -H "X-Data-Hash: ${HASH}" \
  -H "X-Data-Timestamp: ${TIMESTAMP}" \
  -H "X-Data-Nonce: ${NONCE}" \
  --data-binary "${BODY}"
```

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

secret_key = "YOUR_SECRET_KEY"
app_id = 42

body = {
    "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",
                "phone": "9876543210",
                "person": {"first_name": "John", "last_name": "Doe"},
                "customer_account": {"id": "ACC123"},
            },
            "client": {"language": "EN", "country": "IN"},
        }
    },
}

body_str = json.dumps(body, separators=(",", ":"))
hash_value = hashlib.sha512((body_str + secret_key).encode()).hexdigest()

response = requests.post(
    "https://api.bafanglaicai88.com/public/api/multihub/v1",
    headers={
        "Content-Type": "application/json",
        "X-Data-Application-Id": str(app_id),
        "X-Data-Hash": hash_value,
        "X-Data-Timestamp": str(int(time.time())),
        "X-Data-Nonce": str(uuid.uuid4()),
    },
    data=body_str,
    timeout=(3.05, 30),
)

result = response.json()
print(result)
```

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

const secretKey = "YOUR_SECRET_KEY";
const appId = 42;

const body = {
  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",
        phone: "9876543210",
        person: { first_name: "John", last_name: "Doe" },
        customer_account: { id: "ACC123" },
      },
      client: { language: "EN", country: "IN" },
    },
  },
};

const bodyStr = JSON.stringify(body);
const hash = crypto
  .createHash("sha512")
  .update(bodyStr + secretKey)
  .digest("hex");
const timestamp = Math.floor(Date.now() / 1000).toString();
const nonce = crypto.randomUUID();

const response = await axios.post(
  "https://api.bafanglaicai88.com/public/api/multihub/v1",
  bodyStr,
  {
    headers: {
      "Content-Type": "application/json",
      "X-Data-Application-Id": String(appId),
      "X-Data-Hash": hash,
      "X-Data-Timestamp": timestamp,
      "X-Data-Nonce": nonce,
    },
    timeout: 30000,
  },
);

console.log(response.data);
```

### Deposit Request Fields

For `payment.in`, `payer` is required and must be included under `params.payment.payer`.

| Field | Type | Required | Description |
| - | - | :-: | - |
| `description` | string | No | Human-readable description for the payment, up to 1024 characters |
| `identifiers.c_id` | string | Yes | Your unique client reference for this payment (up to 255 characters) |
| `amount.value` | integer | Yes | Payment amount in minor units (e.g., paise for INR); a positive integer. Zero or negative → `6001`, fractional → `9000` |
| `amount.currency` | string | Yes | ISO 4217 currency code; must match the `service_id` route (otherwise `6002`) |
| `payer` | object | Yes | Customer who sends funds for `payment.in` (missing → `1005`) |
| `payer.email` | string | Recommended | Customer email address, up to 255 characters; must be a valid email (may be required by some routes) |
| `payer.phone` | string | No | Customer phone number, up to 50 characters |
| `payer.person.first_name` | string | No | Customer first name only, up to 255 characters |
| `payer.person.last_name` | string | No | Customer last name only, up to 255 characters |
| `payer.customer_account.id` | string | No | Customer account identifier, up to 255 characters; some routes use it as the payer's own account |
| `payer.custom_fields` | object | No | Provider-specific string fields enabled for your route |
| `client.language` | string | No | Up to 10 characters. Accepted for compatibility; currently not passed to the payment route |
| `client.country` | string | No | Up to 3 characters. Accepted for compatibility; currently not passed to the payment route |
| `redirect.on_success` | string | No | HTTP(S) URL, up to 2048 characters. Echoed back in the create response only; currently **not** passed to the payment page |
| `redirect.on_fail` | string | No | HTTP(S) URL, up to 2048 characters. Echoed back in the create response only; currently **not** passed to the payment page |
| `webhook_url` | string | No | Per-payment callback URL. **Temporarily unavailable** — see [Webhooks](https://prod-docs.123hub.pro/guides/webhooks.md) |

Unknown fields anywhere in the request are rejected with `9000`.

> [!NOTE]
>
> **Names.** Payment routes receive the first and last name as separate fields, plus a combined
> full name. Put only the first name in `person.first_name` and only the last name in
> `person.last_name`; routes that need both parts can reject a full name packed into one field. If
> you send no name at all, the payment is recorded with the name `Unknown`. In `payment.status`
> and webhooks, `person` is rebuilt from the stored full name: the first word becomes
> `first_name`, the rest becomes `last_name`.

`payer.custom_fields` accepts at most 20 entries. Keys must start with an ASCII
letter, contain only letters, digits, `_` or `-`, and be at most 64 characters;
values must be strings up to 255 characters, and the whole object is limited to
8 KiB. Credential-like keys, control characters and oversized payloads are
rejected with `9000`. Send only fields documented for the selected route.
Custom fields are used for provider request construction and are not returned
in API responses or merchant webhooks. On `payment.in`, `receiver.custom_fields`
is rejected; use `payer.custom_fields`.

### Country-Specific Fields

Some countries need extra payer data — a document number, the payer's own bank account, a bank
code. Each [country page](https://prod-docs.123hub.pro/countries/overview.md) lists exactly what its routes need.

> [!WARNING]
>
> An amount outside the limits of your route is rejected with `9000 Payment request validation
>     failed` and **no details**. Check the minimum and maximum for every `service_id` with your
> account manager and validate amounts before sending. Such a rejected request still uses up its
> `c_id` — see [Idempotency](#idempotency).

### Response

```json theme={null}
{
  "success": true,
  "result": {
    "payment": {
      "payer": {
        "email": "customer@example.com",
        "phone": "9876543210",
        "person": { "first_name": "John", "last_name": "Doe" }
      },
      "amount": { "value": 10000, "currency": "INR" },
      "description": "Order #12345",
      "identifiers": { "c_id": "12345", "h_id": "1001", "p_id": "txn_abc123" },
      "status": {
        "status": "created",
        "final": false,
        "success": null,
        "error": null,
        "history": [
          {
            "status": "created",
            "final": false,
            "success": null,
            "created": "2026-01-15T10:30:00Z",
            "reason": null,
            "amount": 10000
          }
        ]
      },
      "timestamps": {
        "created": "2026-01-15T10:30:00Z",
        "updated": "2026-01-15T10:30:00Z"
      },
      "destination": "in",
      "service_id": 14701
    }
  },
  "request_id": "req_abc123",
  "processing_time": 42
}
```

> [!NOTE]
>
> For UPI payments (India), the response may include a `redirect` object with
> UPI deep-link URLs in the `redirect.to` field. For other payment methods,
> redirect may not be present in the initial response.

### Full Deposit Response Example

An India UPI deposit. Every [country page](https://prod-docs.123hub.pro/countries/overview.md) shows real responses for its own methods.

```json theme={null}
{
  "success": true,
  "result": {
    "payment": {
      "payer": {
        "customer_account": { "id": "123567890" },
        "email": "customer@example.com",
        "phone": "9013679859",
        "person": { "first_name": "John", "last_name": "Doe" }
      },
      "receiver": {},
      "amount": { "value": 30000, "currency": "INR" },
      "description": "Deposit",
      "identifiers": {
        "c_id": "your-unique-id-123",
        "h_id": "1774892151645",
        "p_id": "SLW17748921516820Q58KA"
      },
      "redirect": {
        "to": [
          "upi://pay?pa=merchant@bank&pn=Merchant&cu=INR&am=300.00",
          "paytmmp://pay?pa=merchant@bank&pn=Merchant&cu=INR&am=300.00",
          "gpay://upi/pay?pa=merchant@bank&pn=Merchant&cu=INR&am=300.00",
          "phonepe://pay?pa=merchant@bank&pn=Merchant&cu=INR&am=300.00"
        ]
      },
      "status": {
        "status": "processing",
        "final": false,
        "success": null,
        "error": null,
        "history": [
          { "status": "created", "final": false, "success": null, "created": "2026-03-30T17:35:51.645Z", "reason": null, "amount": 30000 },
          { "status": "processing", "final": false, "success": null, "created": "2026-03-30T17:35:51.645Z", "reason": null, "amount": 30000 }
        ]
      },
      "timestamps": { "created": "2026-03-30T17:35:51.645Z", "updated": "2026-03-30T17:35:51.645Z" },
      "destination": "in",
      "operations": [{
        "id": "1774892151645",
        "operation_type": "payment.in",
        "amount": { "value": 30000, "currency": "INR" },
        "timestamps": { "created": "2026-03-30T17:35:51.645Z" },
        "status": { "status": "processing", "final": false, "success": null, "error": null }
      }],
      "service_id": 18101
    },
    "operation": {
      "id": "1774892151645",
      "operation_type": "payment.in",
      "amount": { "value": 30000, "currency": "INR" },
      "timestamps": { "created": "2026-03-30T17:35:51.645Z" },
      "status": { "status": "processing", "final": false, "success": null, "error": null }
    }
  },
  "request_id": "4b65a669-19c6-4f2c-9370-ce65d272e7dd",
  "processing_time": 2139
}
```

***

## Creating a Withdrawal (payment.out)

Use `payment.out` to send money to a recipient (payout).

> [!WARNING]
>
> Withdrawals require sufficient available balance and must fit the merchant
> payout limits configured for the requested currency. The API returns `6004`
> when balance is too low, `6006` for daily limit breaches, `6005` for monthly
> limit breaches, and `6035` for other payout-limit rules such as
> since-last-settlement limits.

> [!NOTE]
>
> Use `params.payment.identifiers.c_id` as your own payout identifier and
> idempotency key. The same `c_id` is returned in the create response,
> `payment.status`, and payout webhooks under
> `data.result.payment.identifiers.c_id`.

### Request

```bash cURL theme={null}
curl -X POST "https://api.bafanglaicai88.com/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 42" \
  -H "X-Data-Hash: YOUR_COMPUTED_HASH" \
  -H "X-Data-Timestamp: CURRENT_UNIX_TIMESTAMP" \
  -H "X-Data-Nonce: UNIQUE_REQUEST_NONCE" \
  -d '{
    "method": "payment.out",
    "service_id": 14701,
    "params": {
      "payment": {
        "description": "Payout #67890",
        "identifiers": { "c_id": "67890" },
        "amount": { "value": 50000, "currency": "INR" },
        "receiver": {
          "bank": {
            "account": { "id": "1234567890" },
            "ifsc": "SBIN0001234"
          },
          "email": "recipient@example.com",
          "phone": "9876543210",
          "person": { "first_name": "Jane", "last_name": "Doe" }
        }
      }
    }
  }'
```

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

secret_key = "YOUR_SECRET_KEY"
app_id = 42

body = {
    "method": "payment.out",
    "service_id": 14701,
    "params": {
        "payment": {
            "description": "Payout #67890",
            "identifiers": {"c_id": "67890"},
            "amount": {"value": 50000, "currency": "INR"},
            "receiver": {
                "bank": {
                    "account": {"id": "1234567890"},
                    "ifsc": "SBIN0001234",
                },
                "email": "recipient@example.com",
                "phone": "9876543210",
                "person": {"first_name": "Jane", "last_name": "Doe"},
            },
        }
    },
}

body_str = json.dumps(body, separators=(",", ":"))
hash_value = hashlib.sha512((body_str + secret_key).encode()).hexdigest()

response = requests.post(
    "https://api.bafanglaicai88.com/public/api/multihub/v1",
    headers={
        "Content-Type": "application/json",
        "X-Data-Application-Id": str(app_id),
        "X-Data-Hash": hash_value,
    },
    data=body_str,
)

result = response.json()
print(result)
```

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

const secretKey = "YOUR_SECRET_KEY";
const appId = 42;

const body = {
  method: "payment.out",
  service_id: 14701,
  params: {
    payment: {
      description: "Payout #67890",
      identifiers: { c_id: "67890" },
      amount: { value: 50000, currency: "INR" },
      receiver: {
        bank: {
          account: { id: "1234567890" },
          ifsc: "SBIN0001234",
        },
        email: "recipient@example.com",
        phone: "9876543210",
        person: { first_name: "Jane", last_name: "Doe" },
      },
    },
  },
};

const bodyStr = JSON.stringify(body);
const hash = crypto
  .createHash("sha512")
  .update(bodyStr + secretKey)
  .digest("hex");

const response = await axios.post(
  "https://api.bafanglaicai88.com/public/api/multihub/v1",
  bodyStr,
  {
    headers: {
      "Content-Type": "application/json",
      "X-Data-Application-Id": String(appId),
      "X-Data-Hash": hash,
    },
  },
);

console.log(response.data);
```

### Country-Specific Withdrawal Fields

`receiver.bank` and `receiver.custom_fields` depend on the country — IFSC in India, CLABE in Mexico,
a wallet number and code in Pakistan, a PIX key in Brazil. See the Withdrawal section of your
[country page](https://prod-docs.123hub.pro/countries/overview.md).

### Withdrawal Request Fields

| Field | Type | Required | Description |
| - | - | :-: | - |
| `description` | string | No | Human-readable description for the payout, up to 1024 characters |
| `identifiers.c_id` | string | Yes | Your unique client reference and idempotency key for this payout (up to 255 characters) |
| `amount.value` | integer | Yes | Payout amount in minor units; a positive integer |
| `amount.currency` | string | Yes | ISO 4217 currency code; must match the `service_id` route (otherwise `6002`) |
| `receiver.bank.account.id` | string | Yes | Recipient bank account number, IBAN, CBU/CVU, or CLABE depending on the route, up to 255 characters (missing → `1005`) |
| `receiver.bank.ifsc` | string | India only | IFSC routing code (e.g., `SBIN0001234`), up to 50 characters. Required by Indian banks; send it on every INR withdrawal |
| `receiver.bank.code` | string | Route-dependent | Bank or wallet code (e.g., `BBVA`, `EASYPAISA`, `kasikorn_th`, `002`), up to 50 characters; see your country page. If both `ifsc` and `code` are sent, `ifsc` is used |
| `receiver.email` | string | No | Recipient email address, up to 255 characters; must be a valid email |
| `receiver.phone` | string | No | Recipient phone number, up to 50 characters |
| `receiver.person.first_name` | string | Recommended | Recipient first name only, up to 255 characters. If no name is sent the recipient is recorded as `Unknown`, and many routes reject that |
| `receiver.person.last_name` | string | Recommended | Recipient last name only, up to 255 characters. Routes that need both parts receive them separately |
| `receiver.customer_account.id` | string | No | Recipient identifier in your system, up to 255 characters |
| `receiver.custom_fields` | object | No | Provider-specific string fields enabled for the selected route |
| `webhook_url` | string | No | Per-payment callback URL. **Temporarily unavailable** — see [Webhooks](https://prod-docs.123hub.pro/guides/webhooks.md) |

`receiver.custom_fields` has the same bounds as the deposit namespace: at most
20 safe ASCII-named fields (keys up to 64 characters), string values up to 255
characters, and an 8 KiB serialized limit. Credential-like keys and control
characters are rejected. Send only fields documented for the selected route;
they are not returned in API responses or merchant webhooks. On `payment.out`,
`payer.custom_fields` is rejected; use `receiver.custom_fields`.

> [!NOTE]
>
> **How withdrawals are validated.** The route — including its method — comes from the
> `service_id`; you never send a method. Before the request reaches the provider the API checks:
> `receiver.bank.account.id` is present (otherwise `1005`), MXN withdrawals carry an 18-digit CLABE
> with a valid checksum, and bank-transfer routes get an account of at least 10 characters
> (otherwise `9000`). A `9000` here is recorded as a failed withdrawal under your `c_id`, so send
> the corrected withdrawal with a new `c_id`. Everything else — IFSC, bank codes, names,
> documents — is checked by the provider, and a mistake there ends the withdrawal with an error
> status.

> [!NOTE]
>
> **Deposits use `payer`, withdrawals use `receiver`.** The `payer` object
> describes who is sending the money (deposit), while the `receiver` object
> describes who is receiving the money (withdrawal). Both contain contact
> information and, for `receiver`, bank account details.

### Tracking Withdrawal Completion

The initial `payment.out` response usually has `status.status: "processing"`. Wait for a webhook or poll `payment.status` with your `c_id` or the returned `h_id`.

| Identifier | Meaning | Where to use it |
| - | - | - |
| `c_id` | Your payout reference from the request | Primary lookup and reconciliation key |
| `h_id` | 123hub payment/operation identifier | Alternative lookup key returned by the API |
| `p_id` | Provider reference, when available | Reconciliation only; treat as opaque |

Payout lifecycle webhooks use the same payment envelope as deposits. Read the business identifier from `data.result.payment.identifiers.c_id`; do not depend on provider-only callback fields such as `order_id`, `transaction_id`, `session_token`, or `user_id`.

### Full Withdrawal Response Example

An Argentina bank-transfer withdrawal. Country pages show the withdrawal responses for their routes.

```json theme={null}
{
  "success": true,
  "result": {
    "payment": {
      "receiver": {
        "email": "carlos@example.com",
        "phone": "1155551234",
        "person": { "first_name": "Carlos", "last_name": "Garcia" },
        "bank": {
          "account": { "id": "0110599940000041227728" },
          "code": "BBVA"
        }
      },
      "amount": { "value": 1000000, "currency": "ARS" },
      "identifiers": {
        "c_id": "your-payout-id",
        "h_id": "38322de4-25ad-4619-8960-46d29cab8e20",
        "p_id": "pay_1775118858499_75a26526"
      },
      "status": {
        "status": "processing",
        "final": false,
        "success": null,
        "error": null,
        "history": [
          { "status": "created", "final": false, "success": null, "created": "2026-04-02T08:34:18.297Z", "reason": null, "amount": 1000000 }
        ]
      },
      "timestamps": { "created": "2026-04-02T08:34:18.297Z" },
      "destination": "out",
      "operations": [{
        "id": "38322de4-25ad-4619-8960-46d29cab8e20",
        "operation_type": "payment.out",
        "amount": { "value": 1000000, "currency": "ARS" },
        "timestamps": { "created": "2026-04-02T08:34:18.297Z" },
        "status": { "status": "processing", "final": false, "success": null, "error": null }
      }],
      "service_id": 12501
    },
    "operation": {
      "id": "38322de4-25ad-4619-8960-46d29cab8e20",
      "operation_type": "payment.out",
      "amount": { "value": 1000000, "currency": "ARS" },
      "timestamps": { "created": "2026-04-02T08:34:18.297Z" },
      "status": { "status": "processing", "final": false, "success": null, "error": null }
    }
  },
  "request_id": "5a92838a-3644-4fb1-9a1e-ff79d24a3bb1",
  "processing_time": 327
}
```

***

## Checking Payment Status (payment.status)

Use `payment.status` to query the current state of a payment. You can look up a payment by either `c_id` (your reference) or `h_id` (system-assigned ID).

### Query by c\_id

```bash cURL theme={null}
curl -X POST "https://api.bafanglaicai88.com/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 42" \
  -H "X-Data-Hash: YOUR_COMPUTED_HASH" \
  -H "X-Data-Timestamp: CURRENT_UNIX_TIMESTAMP" \
  -H "X-Data-Nonce: UNIQUE_REQUEST_NONCE" \
  -d '{
    "method": "payment.status",
    "params": {
      "payment": {
        "identifiers": { "c_id": "12345" }
      }
    }
  }'
```

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

secret_key = "YOUR_SECRET_KEY"
app_id = 42

body = {
    "method": "payment.status",
    "params": {
        "payment": {
            "identifiers": {"c_id": "12345"}
        }
    },
}

body_str = json.dumps(body, separators=(",", ":"))
hash_value = hashlib.sha512((body_str + secret_key).encode()).hexdigest()

response = requests.post(
    "https://api.bafanglaicai88.com/public/api/multihub/v1",
    headers={
        "Content-Type": "application/json",
        "X-Data-Application-Id": str(app_id),
        "X-Data-Hash": hash_value,
    },
    data=body_str,
)

result = response.json()
print(result)
```

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

const secretKey = "YOUR_SECRET_KEY";
const appId = 42;

const body = {
  method: "payment.status",
  params: {
    payment: {
      identifiers: { c_id: "12345" },
    },
  },
};

const bodyStr = JSON.stringify(body);
const hash = crypto
  .createHash("sha512")
  .update(bodyStr + secretKey)
  .digest("hex");

const response = await axios.post(
  "https://api.bafanglaicai88.com/public/api/multihub/v1",
  bodyStr,
  {
    headers: {
      "Content-Type": "application/json",
      "X-Data-Application-Id": String(appId),
      "X-Data-Hash": hash,
    },
  },
);

console.log(response.data);
```

### Query by h\_id

You can also look up a payment using the system-assigned `h_id`. `payment.status` never requires
`service_id`. If you send both `c_id` and `h_id`, the lookup uses `h_id`:

```json theme={null}
{
  "method": "payment.status",
  "params": {
    "payment": {
      "identifiers": { "h_id": "1001" }
    }
  }
}
```

### Response

The response contains the full payment object with its current status:

```json theme={null}
{
  "success": true,
  "result": {
    "payment": {
      "payer": {
        "email": "customer@example.com",
        "phone": "9876543210",
        "person": { "first_name": "John", "last_name": "Doe" }
      },
      "amount": { "value": 10000, "currency": "INR" },
      "description": "Order #12345",
      "identifiers": { "c_id": "12345", "h_id": "1001", "p_id": "txn_abc123" },
      "status": {
        "status": "success",
        "final": true,
        "success": true,
        "error": null,
        "history": [
          {
            "status": "created",
            "final": false,
            "success": null,
            "created": "2026-01-15T10:30:00Z",
            "reason": null,
            "amount": 10000
          },
          {
            "status": "processing",
            "final": false,
            "success": null,
            "created": "2026-01-15T10:30:05Z",
            "reason": null,
            "amount": 10000
          },
          {
            "status": "success",
            "final": true,
            "success": true,
            "created": "2026-01-15T10:35:12Z",
            "reason": null,
            "amount": 10000
          }
        ]
      },
      "timestamps": {
        "created": "2026-01-15T10:30:00Z",
        "updated": "2026-01-15T10:35:12Z",
        "finished": "2026-01-15T10:35:12Z"
      },
      "destination": "in",
      "service_id": 14701
    }
  },
  "request_id": "req_xyz789",
  "processing_time": 12
}
```

***

## Re-sending Webhook (payment.notification)

Use `payment.notification` to trigger a webhook re-delivery for a specific payment. The request format is identical to `payment.status`, and the response returns the full payment object:

```json theme={null}
{
  "method": "payment.notification",
  "operation_id": "notification-retry-1001",
  "params": {
    "payment": {
      "identifiers": { "c_id": "your-payment-id" }
    }
  }
}
```

| Field | Type | Required | Description |
| - | - | :-: | - |
| `method` | string | Yes | `"payment.notification"` |
| `operation_id` | string | No | Stable idempotency identifier; reuse only for an exact retry |
| `service_id` | integer | No | Optional fallback if the original payment metadata does not contain `service_id` |
| `params.payment.identifiers.c_id` | string | Yes\* | Your client reference for the payment |
| `params.payment.identifiers.h_id` | string | Yes\* | Hub payment ID |

> [!NOTE]
>
> Provide either `c_id` or `h_id`. This method triggers a new webhook delivery
> to your active webhook endpoints with the current payment state. Use it only
> as a recovery action when your webhook handler missed or failed to process a
> notification. For read-only checks or polling, use `payment.status` with
> backoff instead. The method is limited to 10 requests per minute. Without
> `operation_id`, compatibility idempotency is scoped to the canonical request
> and current minute.

***

## Payment Statuses

Each payment has a status object with the current status name, and boolean flags indicating whether it is final and whether it represents a success.

| Status | Description | `final` | `success` |
| - | - | :-: | :-: |
| `created` | Payment created, waiting for processing | `false` | `null` |
| `processing` | Payment is being processed | `false` | `null` |
| `success` | Payment completed successfully | `true` | `true` |
| `error` | Payment failed | `true` | `false` |
| `canceled` | Payment was cancelled | `true` | `false` |
| `declined` | Payment expired or was declined | `true` | `false` |
| `refunded` | Full refund processed | `true` | `true` |
| `partially_refunded` | Partial refund processed | `true` | `true` |

> [!NOTE]
>
> **Terminal statuses** are indicated by `final: true`. A terminal status is the
> current completed outcome for integration handling, but reconciliation,
> refunds, or provider corrections can publish a later status update. Always
> process webhooks idempotently by payment id and status timestamp.

### Status Object Structure

Every payment includes a `status` object with the following fields:

```json theme={null}
{
  "status": {
    "status": "processing",
    "final": false,
    "success": null,
    "error": null,
    "history": [
      {
        "status": "created",
        "final": false,
        "success": null,
        "created": "2026-01-15T10:30:00Z",
        "reason": null,
        "amount": 10000
      },
      {
        "status": "processing",
        "final": false,
        "success": null,
        "created": "2026-01-15T10:30:05Z",
        "reason": null,
        "amount": 10000
      }
    ]
  }
}
```

The `history` array contains every status transition the payment has gone through, in chronological order. This is useful for debugging and auditing.

### Handling Status Changes

```javascript theme={null}
// Example: Checking payment status and acting on it
const { payment } = response.result;
const { status } = payment.status;

if (payment.status.final) {
  if (payment.status.status === "success") {
    await markOrderAsPaid(payment.identifiers.c_id);
  } else if (
    payment.status.status === "refunded" ||
    payment.status.status === "partially_refunded"
  ) {
    await updateRefundState(payment.identifiers.c_id, payment.status.status);
  } else {
    // Payment failed (error, canceled, declined)
    await notifyPaymentFailed(payment.identifiers.c_id, payment.status.error);
  }
} else {
  // Payment still in progress (created, processing)
  // Wait for webhook or poll again later
}
```

***

## Redirect URLs

For deposit payments (`payment.in`), the response may include a `redirect` object. For UPI payments (India), this contains deep-link URLs for mobile payment apps:

```json theme={null}
{
  "redirect": {
    "to": [
      "upi://pay?pa=merchant@bank&am=100",
      "paytmmp://pay?pa=merchant@bank&am=100",
      "gpay://upi/pay?pa=merchant@bank&am=100",
      "phonepe://pay?pa=merchant@bank&am=100"
    ]
  }
}
```

| Field | Description |
| - | - |
| `to` | Where the customer completes the payment: an HTTPS payment-page URL (**string**), or UPI deep links for India — a **string** when there is one link, an **array** when there are several. Absent on host-to-host routes that return bank, wallet or QR details in `receiver` instead |
| `on_fail` | In the create response: the `redirect.on_fail` you sent, echoed back. In `payment.status` and webhooks: present only when the payment route itself returns a failure URL |
| `on_success` | In the create response: the `redirect.on_success` you sent, echoed back. In `payment.status` and webhooks: present only when the payment route itself returns a success URL |

> [!WARNING]
>
> `redirect.on_success` and `redirect.on_fail` in your request are currently **not** passed to the
> payment page — they are only echoed in the create response. Do not rely on them to bring the
> payer back to your site; agree the return behaviour for your routes with your account manager.

> [!NOTE]
>
> The `redirect.to` field can contain UPI deep-link URLs, a provider HTTPS
> payment page URL, or another provider-specific redirect target. The `redirect`
> field may be absent if no redirect URL is available for the payment method.

If a provider returns only a valid generic `upi://pay?<query>` link, the API
fills the missing Paytm, Google Pay, and PhonePe links in that order. Existing
provider-specific links are preserved. The same representation is used in the
payment creation response, payment status response, and merchant webhook.

### Deposit Flow Types

What a `payment.in` response gives you depends on the route behind your `service_id`. There are five
shapes; your [country page](https://prod-docs.123hub.pro/countries/overview.md) says which ones its methods use.

| Flow | `redirect.to` | `receiver` | What you do |
| - | - | - | - |
| Payment page | HTTPS URL string | Empty `{}` | Redirect the payer to the page |
| UPI deep link (India) | `upi://` link — string, or array of app links | `bank_account.id` = VPA, `qr_payload` | Open the UPI app; show the QR on desktop |
| Bank details (host-to-host) | Usually absent | `bank_account {id, name}`, `bank {name, code}`, sometimes `phone`, `document` | Show the details; the payer transfers the exact amount |
| QR code | Often a page with the same QR | `qr_payload` — QR string or `data:image/png;base64,...` | Render the QR |
| Push to the payer's phone | Absent | `bank.name` = wallet/operator, `bank_account.id` = instruction text | Show the instruction as a message, not as an account number |

A bank-details response with every field the API can return (each one appears only when the route
provides it):

```json theme={null}
{
  "receiver": {
    "bank_account": { "id": "01040019860190162931", "name": "Maria Lopez" },
    "bank": { "name": "Banco Venezolano de Credito", "code": "0104" },
    "phone": "+584121234567",
    "document": { "type": "cedula", "number": "V-12345678" },
    "qr_payload": "000201010212..."
  }
}
```

| Field | Description |
| - | - |
| `receiver.bank_account.id` | Account the payer pays to: account number, IBAN, CBU/CVU, CLABE, VPA — or an instruction text on push flows |
| `receiver.bank_account.name` | Account holder name |
| `receiver.bank.name`, `receiver.bank.code` | Receiving bank or wallet |
| `receiver.phone` | Phone to pay to (P2P routes) |
| `receiver.document` | Recipient document the payer may need to enter |
| `receiver.qr_payload` | QR string or `data:image/png;base64,...` image |

The same `receiver` fields are returned by `payment.status` and in webhooks.

***

## Customer Data

### Deposits: the `payer` Object

For `payment.in` requests, the `payer` object describes the customer making the payment:

```json theme={null}
{
  "payer": {
    "email": "customer@example.com",
    "phone": "9876543210",
    "person": {
      "first_name": "John",
      "last_name": "Doe"
    },
    "customer_account": {
      "id": "ACC123"
    }
  }
}
```

### Withdrawals: the `receiver` Object

For `payment.out` requests, the `receiver` object describes who receives the payout, including their bank details:

```json theme={null}
{
  "receiver": {
    "bank": {
      "account": { "id": "1234567890" },
      "ifsc": "SBIN0001234"
    },
    "email": "recipient@example.com",
    "phone": "9876543210",
    "person": {
      "first_name": "Jane",
      "last_name": "Doe"
    }
  }
}
```

The `receiver.bank` object contains the banking details required to execute the transfer. Which
fields are needed depends on the country — see the Withdrawal section of your
[country page](https://prod-docs.123hub.pro/countries/overview.md).

| Country | `bank.account.id` | Additional fields | Notes |
| - | - | - | - |
| India (INR) | Account number | `ifsc` | IFSC routing code |
| Mexico (MXN) | CLABE (18 digits) | None | Put the CLABE in `bank.account.id` |
| Argentina (ARS) | CBU (22 digits) | `code` (optional) | Bank code, e.g. `BBVA` |
| Turkey (TRY) | IBAN (`TR...`) | -- | No additional fields |
| Pakistan (PKR) | Wallet number (`03XXXXXXXXX`) or bank account | `code` — `EASYPAISA` / `JAZZCASH` or the bank code for your route | Required. Recipient name in Latin letters |
| Brazil (BRL) | PIX key | `custom_fields.docType`, `docNumber` | — |
| Thailand (THB) | Bank account number | `code` (e.g. `kasikorn_th`) | Same account and name as the payer's deposits |
| Bolivia (BOB) | Bank account number | `code` (e.g. `idepro`) | Minimum 10 BOB |
| Burundi (BIF) | Mobile money number (`257XXXXXXXX`) | -- | Amount in whole francs |
| Venezuela (VES) | Pago Móvil phone (`+58…`) | `custom_fields.bank_name`, `tax_id` | — |
| Uruguay (UYU) | Account number | `custom_fields.bank_name`, `identification_type`, `identification_number`, `street_address`, `city`, `zip_code` | — |
| Ecuador (ECS) | Account number | `code`, `custom_fields.beneficiaryType`, `beneficiaryId`, `beneficiaryBankType` | — |
| Peru (PEN) | Account number / CCI | `code` (e.g. `002`), `custom_fields.beneficiaryType`, `beneficiaryId`, `beneficiaryBankType` | — |

***

## Additional Response Fields

### Operations

Every payment response includes an `operations` array and an `operation` shortcut:

| Field | Type | Description |
| - | - | - |
| `result.payment.operations` | array | Array of operations when operation metadata is available; when present it contains at least one item |
| `result.payment.operations[].id` | string | Operation ID (same as `h_id` for the primary operation) |
| `result.payment.operations[].operation_type` | string | `"payment.in"` or `"payment.out"` |
| `result.payment.operations[].amount` | object | `{value, currency}` -- operation amount |
| `result.payment.operations[].timestamps` | object | `{created, updated?, finished?}` |
| `result.payment.operations[].status` | object | Status object (`status`, `final`, `success`, `error`) |
| `result.operation` | object | Shortcut -- same as `operations[0]` |

```json theme={null}
{
  "operations": [
    {
      "id": "b8166e5e-2ec8-4c9c-b5a0-157a54e6ee65",
      "operation_type": "payment.in",
      "amount": { "value": 200000, "currency": "ARS" },
      "timestamps": { "created": "2026-04-02T08:34:14.001Z" },
      "status": {
        "status": "processing",
        "final": false,
        "success": null,
        "error": null
      }
    }
  ],
  "operation": {
    "id": "b8166e5e-2ec8-4c9c-b5a0-157a54e6ee65",
    "operation_type": "payment.in",
    "amount": { "value": 200000, "currency": "ARS" },
    "timestamps": { "created": "2026-04-02T08:34:14.001Z" },
    "status": {
      "status": "processing",
      "final": false,
      "success": null,
      "error": null
    }
  }
}
```

### Identifier Formats

The `h_id` is assigned by 123hub, not by the provider. Treat it as an opaque string:

* New payments get a UUID (e.g., `"b8adedc9-c245-4fa2-8f26-095e8117d11a"`)
* Older payments may carry other formats, such as numeric strings (e.g., `"1774892151645"`); these are still accepted for lookups

### `status.error` Field

The `status.error` field inside the payment status object can be:

* `null` -- no error
* `integer` -- error code (e.g., `7001`)
* `string` -- error message from provider (e.g., `"Sum 150000 is lower than 200000"`)

> [!NOTE]
>
> Do not confuse `result.payment.status.error` (integer/string/null inside the
> payment status) with the top-level `error` object in error API responses
> (which has `code`, `message`, `details`, `context` fields).

### Bank Details in `payment.status`

> [!WARNING]
>
> For withdrawals, only the create response echoes the `receiver.bank` you sent. `payment.status`
> and webhooks return the recipient's name, email, phone and `customer_account`, but not
> `receiver.bank` (account, IFSC, code) or `receiver.custom_fields`. Store the full recipient
> details when you create the withdrawal.

***

## Idempotency

The `c_id` (Client ID) serves as your idempotency key. If you send a `payment.in` or `payment.out` request with a `c_id` that was already used, the API will return error code `6009` (Payment already exists) instead of creating a duplicate.

> [!WARNING]
>
> Always use a unique `c_id` for each payment. If you receive a `6009` error, it
> means a payment with that `c_id` already exists. Use `payment.status` to
> retrieve its current state rather than creating a new one.

**When is a `c_id` used up?**

* Requests rejected before processing starts — authentication errors (`3xxx`), a missing or
  invalid field (`1005`), request-shape validation (`9000` with field `details`), `6001`, `6002`,
  `2002` for an unknown `service_id` — do not create a payment. Fix the request and resend it with
  the same `c_id`.
* Requests rejected during processing — for example an amount outside the route limits or invalid
  withdrawal data (`9000` without details), insufficient balance or payout limits (`6004`, `6005`,
  `6006`, `6035`), a provider error (`7001`) or an internal error (`2001`) — are stored as a failed
  payment under that `c_id`. Resending the same `c_id` returns
  `6009`, and `payment.status` with that `c_id` shows status `error`. Send the corrected request
  with a new `c_id`.
* A second create with the same `c_id` while the first is still being processed returns `2002`
  (HTTP `503`). Wait and query `payment.status` instead of creating again.

```javascript theme={null}
// Example: Handling duplicate payment attempts
const response = await createPayment(body);

if (!response.success && response.error?.code === 6009) {
  // Payment already exists -- fetch its current status instead
  const statusResponse = await checkPaymentStatus(
    body.params.payment.identifiers.c_id,
  );
  return statusResponse.result.payment;
}
```

***

## Error Handling

When a request fails, the response has `success: false` and includes an `error` object. Business and validation errors return HTTP `400`; dependency and internal failures use the corresponding `5xx` status:

```json theme={null}
{
  "success": false,
  "error": {
    "code": 6010,
    "message": "Payment does not exist",
    "details": null,
    "context": null
  },
  "request_id": "req_err789",
  "processing_time": 5
}
```

> [!NOTE]
>
> Successful responses return HTTP `200`. Handle HTTP `400`, `403`, `404`,
> `409`, and `429` as non-retryable unless the error-specific guidance says
> otherwise. HTTP `500`, `502`, `503`, and `504` (and network timeouts) are
> transient candidates. For `payment.in` and `payment.out`, first query
> `payment.status` with the same `c_id`: if it returns `6010`, retry the create
> with bounded backoff and the same `c_id` and payload; if it returns a payment,
> use that result. Always inspect both the HTTP status and the structured
> `error.code`.

### Error Codes

| Code | Description | Recommended Action |
| - | - | - |
| `1002` | Payment method is not available (HTTP `404`) | The route behind `service_id` is not enabled for your account right now; contact your account manager |
| `1005` | Invalid request format (missing required field) | Check the `details` field for specifics on which field is missing |
| `2002` | No available route / service temporarily unavailable (HTTP `503`) | Check the `service_id` and its direction (deposit vs withdrawal); if a create with the same `c_id` is still running, query `payment.status` |
| `6001` | Incorrect transaction amount | Verify amount is a positive integer in minor units |
| `6002` | Incorrect currency code | Ensure currency matches the `service_id` configuration |
| `6004` | Insufficient funds (withdrawals) | Top up your merchant balance before retrying |
| `6005` | Monthly payout limit exceeded | Wait until next merchant-timezone month or contact account manager |
| `6006` | Daily payout limit exceeded | Wait until next merchant-timezone day or contact account manager |
| `6009` | Payment already exists (duplicate `c_id`) | Use `payment.status` to retrieve the existing payment |
| `6010` | Payment does not exist | Verify the `c_id` or `h_id` is correct |
| `6035` | Exceeded payments | Contact account manager to review payout limits, including since-last-settlement rules |
| `7001` | Provider interaction error | Retry after a delay or contact support |
| `8600` | Invalid bank credentials | Verify bank account number and routing code format |
| `8801` | Invalid status transition | Check current payment status before attempting operations |
| `9000` | Validation error | With field `details`: fix the request. Without details: amount outside route limits or invalid withdrawal data — fix it and use a new `c_id` |

### Error Handling Example

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

secret_key = "YOUR_SECRET_KEY"
app_id = 42

body = {
    "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",
                "phone": "9876543210",
                "person": {"first_name": "John", "last_name": "Doe"},
            },
        }
    },
}

body_str = json.dumps(body, separators=(",", ":"))
hash_value = hashlib.sha512((body_str + secret_key).encode()).hexdigest()

response = requests.post(
    "https://api.bafanglaicai88.com/public/api/multihub/v1",
    headers={
        "Content-Type": "application/json",
        "X-Data-Application-Id": str(app_id),
        "X-Data-Hash": hash_value,
    },
    data=body_str,
)

result = response.json()

if result["success"]:
    payment = result["result"]["payment"]
    print(f"Payment created: h_id={payment['identifiers']['h_id']}")
    if payment.get("redirect", {}).get("to"):
        print(f"Redirect customer to: {payment['redirect']['to']}")
else:
    error = result["error"]
    print(f"Error {error['code']}: {error['message']}")

    if error["code"] == 6009:
        print("Payment already exists. Fetching status...")
    elif error["code"] == 6004:
        print("Insufficient funds. Please top up.")
    elif error["code"] in (6005, 6006, 6035):
        print("Payout limit exceeded. Contact account manager.")
    elif error["code"] == 1005:
        print("Missing required field. Check error details.")
```

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

const secretKey = "YOUR_SECRET_KEY";
const appId = 42;

async function createDeposit(cId, amount, currency, payer) {
  const body = {
    method: "payment.in",
    service_id: 14701,
    params: {
      payment: {
        identifiers: { c_id: cId },
        amount: { value: amount, currency },
        payer,
      },
    },
  };

  const bodyStr = JSON.stringify(body);
  const hash = crypto
    .createHash("sha512")
    .update(bodyStr + secretKey)
    .digest("hex");

  const response = await axios.post(
    "https://api.bafanglaicai88.com/public/api/multihub/v1",
    bodyStr,
    {
      headers: {
        "Content-Type": "application/json",
        "X-Data-Application-Id": String(appId),
        "X-Data-Hash": hash,
      },
    },
  );

  const result = response.data;

  if (result.success) {
    const payment = result.result.payment;
    console.log(`Payment created: h_id=${payment.identifiers.h_id}`);
    return payment;
  }

  const { code, message } = result.error;
  console.error(`Error ${code}: ${message}`);

  switch (code) {
    case 6009:
      console.log("Payment already exists. Fetching status...");
      break;
    case 6004:
      console.log("Insufficient funds. Please top up.");
      break;
    case 6005:
    case 6006:
    case 6035:
      console.log("Payout limit exceeded. Contact account manager.");
      break;
    case 1005:
      console.log("Missing required field. Check error details.");
      break;
    default:
      console.log("Unexpected error. Contact support.");
  }

  throw new Error(`Payment API error ${code}: ${message}`);
}
```

***

## Best Practices

> [card] Use Unique c\_id Values
>
> Always assign a unique `c_id` to each payment. This serves as your
> idempotency key and prevents duplicate payments.

> [card] Compute Hashes Server-Side
>
> Never expose your secret key to the client. Always compute the `X-Data-Hash`
> on your server.

> [card] Check success Field
>
> Always check the `success` boolean in the response body to determine the
> outcome. Success returns HTTP 200; errors usually return HTTP 400.

> [card] Store All Identifiers
>
> Save `c_id`, `h_id`, and `p_id` from the response for reconciliation,
> debugging, and support inquiries.

> [card] Handle Redirects
>
> For deposits, always check for a `redirect.to` URL and redirect the customer
> to complete their payment.

> [card] Use Status History
>
> The `status.history` array provides a complete audit trail. Use it for
> debugging and tracking payment lifecycle.


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