Quick Start
This guide will help you create your first payment using the 123hub 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
2
Understand request signing
Every request must include two authentication headers; the replay pair is optional:
X-Data-Application-Id— your integer application IDX-Data-Hash— SHA-512 hash of the raw JSON request body concatenated with your secret key:sha512(requestBody + secretKey)X-Data-Timestamp— optional current Unix timestamp in secondsX-Data-Nonce— optional unique nonce for this request; send it together with the timestamp
Merchant accounts and credentials are created by the 123hub team. Self-registration is not available.
Step 2: Test Connectivity
Verify your credentials work by callinggateway.ping:
Step 3: Create a Deposit
Create a deposit payment (customer pays to you) using thepayment.in method.
The
service_id value is assigned per merchant during onboarding. It determines the provider, payment method, and currency for the payment. Use the value provided by your account manager. The examples below use placeholder service_id values for illustration.Response
Step 4: Check Payment Status
Usepayment.status with the h_id returned from the deposit to check its current status:
Step 5: Check Balance
Usebalance.get to retrieve your current account balance:
Understanding the Response
All API responses follow the same envelope format:Payment identifiers
Payment statuses
What’s Next?
Set up Webhooks
Receive real-time notifications when the payment completes
Payment Types
Learn about deposits, withdrawals, and payment pages
Test Your Integration
Validate signing, payments, balances, and webhooks before production traffic
Balance Management
Monitor and manage your merchant balances
Go Live
Switch to production when you’re ready
Common Issues
Error 3000: Authentication Error
Error 3000: Authentication Error
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.Error 3003: Application Not Found
Error 3003: Application Not Found
Check that the
X-Data-Application-Id header contains your correct integer application ID.Error 1005: Invalid Request Format
Error 1005: Invalid Request Format
Ensure all required fields are present in your request. For
payment.in, you must include service_id and the params.payment object with amount (value and currency), identifiers.c_id, and payer; for payment.out, receiver.bank.account.id instead of payer. Send c_id as a string. Check the details field in the error response for specifics. A missing or misspelled method, unknown fields and wrong types return 9000 instead.Error 2002: No Route Available
Error 2002: No Route Available
The
service_id does not exist, or it belongs to the other direction — for example a withdrawal service_id sent with payment.in. Check the value and direction your account manager issued.Error 1002: Payment Method Not Available (HTTP 404)
Error 1002: Payment Method Not Available (HTTP 404)
The route behind your
service_id is not enabled for your account, or is outside its availability hours. Contact your account manager to verify your service configuration.