Skip to main content

Quick Start

This guide will help you create your first payment using the 123hub Multihub API.

Step 1: Get Your Credentials

1

Obtain your credentials

Credentials are provided by the 123hub team during merchant onboarding. You will receive:
  • application_id — an integer identifying your application
  • secret_key — a private key used to sign requests
Contact your account manager or reach out to [email protected] to request access.
2

Understand request signing

Every request must include two authentication headers:
  • X-Data-Application-Id — your integer application ID
  • X-Data-Hash — SHA-512 hash of the raw JSON request body concatenated with your secret key: sha512(requestBody + secretKey)
Merchant accounts and credentials are created by the 123hub team. Self-registration is not available.

Step 2: Test Connectivity

Verify your credentials work by calling gateway.ping:
# Compute the hash: sha512('{"method":"gateway.ping","params":{}}' + YOUR_SECRET_KEY)
curl -X POST "https://api.123hub.pro/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 1" \
  -H "X-Data-Hash: <sha512_hash>" \
  -d '{
    "method": "gateway.ping",
    "params": {}
  }'
Response:
{
  "success": true,
  "result": {
    "message": "pong"
  },
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "processing_time": 5
}

Step 3: Create a Deposit

Create a deposit payment (customer pays to you) using the payment.in method.
curl -X POST "https://api.123hub.pro/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 1" \
  -H "X-Data-Hash: <sha512_hash>" \
  -d '{
    "method": "payment.in",
    "service_id": 14701,
    "params": {
      "payment": {
        "description": "Order #12345",
        "identifiers": { "c_id": 12345 },
        "amount": { "value": 10000, "currency": "INR" },
        "payer": {
          "email": "[email protected]",
          "phone": "9876543210",
          "person": { "first_name": "John", "last_name": "Doe" }
        },
        "client": { "language": "EN", "country": "IN" }
      }
    }
  }'

Response

{
  "success": true,
  "result": {
    "payment": {
      "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 },
      "timestamps": { "created": "2026-01-15T10:30:00Z" },
      "destination": "in",
      "service_id": 14701
    }
  },
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "processing_time": 125
}

Step 4: Check Payment Status

Use payment.status with the h_id returned from the deposit to check its current status:
curl -X POST "https://api.123hub.pro/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 1" \
  -H "X-Data-Hash: <sha512_hash>" \
  -d '{
    "method": "payment.status",
    "params": {
      "payment": {
        "identifiers": { "h_id": 1001 }
      }
    }
  }'
Response:
{
  "success": true,
  "result": {
    "payment": {
      "payer": {
        "email": "[email protected]",
        "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": "processing",
        "final": false,
        "success": 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 }
        ]
      },
      "timestamps": {
        "created": "2026-01-15T10:30:00Z",
        "updated": "2026-01-15T10:30:05Z"
      },
      "destination": "in",
      "service_id": 14701
    }
  },
  "request_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
  "processing_time": 42
}

Step 5: Check Balance

Use balance.get to retrieve your current account balance:
curl -X POST "https://api.123hub.pro/public/api/multihub/v1" \
  -H "Content-Type: application/json" \
  -H "X-Data-Application-Id: 1" \
  -H "X-Data-Hash: <sha512_hash>" \
  -d '{
    "method": "balance.get",
    "params": {}
  }'
Response:
{
  "success": true,
  "result": {
    "balance": {
      "id": 0,
      "amounts": [
        { "value": 500000, "value_freezing": 10000, "value_blocking": 0, "currency": "INR", "enabled": true },
        { "value": 250000, "value_freezing": 5000, "value_blocking": 0, "currency": "MXN", "enabled": true },
        { "value": 1000000, "value_freezing": 0, "value_blocking": 0, "currency": "ARS", "enabled": true }
      ],
      "enabled": true
    }
  },
  "request_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "processing_time": 18
}

Understanding the Response

All API responses follow the same envelope format:
FieldDescription
successtrue if the request succeeded, false if an error occurred
resultThe response payload (structure varies by method)
errorPresent only on failure. Contains code (integer), message (string), details, and context
request_idUnique identifier for this request (useful for debugging)
processing_timeServer processing time in milliseconds

Payment identifiers

IdentifierDescription
c_idYour client-side identifier (the value you send)
h_idHub-assigned payment identifier (use this for status queries)
p_idProvider-assigned transaction identifier

Payment statuses

StatusfinalsuccessDescription
createdfalsenullPayment created, awaiting processing
processingfalsenullPayment is being processed
successtruetruePayment completed successfully
errortruefalsePayment failed
canceledtruefalsePayment was cancelled
declinedtruefalsePayment expired or was declined
refundedtruetruePayment was refunded

What’s Next?

Common Issues

Verify that X-Data-Hash is computed as sha512(requestBody + secretKey) where requestBody is the exact JSON string sent in the request body. Ensure there is no extra whitespace or encoding difference between what you hash and what you send.
Check that the X-Data-Application-Id header contains your correct integer application ID.
Ensure all required fields are present in your request. The method and params fields are always required. For payment.in, you must include service_id and the params.payment object with amount, identifiers, and payer. Check the details field in the error response for specifics.
The specified service_id may not be enabled for your account, or the payment method is temporarily unavailable. Contact your account manager to verify your service configuration.