Authentication
All API requests to 123hub must be authenticated using two headers: your Application ID and a SHA512 hash computed from the request body and your secret key. This page explains how to obtain your credentials and sign requests.Obtaining Credentials
API credentials and merchant accounts are created by the 123hub team during
onboarding. Self-registration is not available.
- Contact your 123hub account manager
- Or email support@123hub.pro
| Credential | Type | Description |
|---|---|---|
application_id | Integer | Your unique application identifier (e.g., 1, 42) |
secret_key | String | A random secret string used to sign requests |
Authentication Headers
Every request to the API must include two headers:| Header | Value | Description |
|---|---|---|
X-Data-Application-Id | Integer | Your application ID |
X-Data-Hash | Hex string | SHA512 hash of requestBody + secretKey |
How Signing Works
Prepare the request body
Serialize your request body as a JSON string. This is the exact string that
will be sent as the HTTP body.
Compute the hash
Concatenate the JSON string with your
secret_key (no separator), then
compute the SHA512 hash of the result. Output as a lowercase hex string. hash = SHA512(jsonBody + secretKey)Code Examples
Verifying API Response Signatures
Successful MultiHub responses includeX-Data-Hash. Verify it with the same merchant API secret:
Verifying Webhook Signatures
When 123hub sends webhook notifications to your server, the request includes anX-Data-Hash header. New deliveries also include replay-protection metadata in X-Webhook-Id, X-Webhook-Timestamp, X-Webhook-Nonce, and X-Webhook-Signature-V2. You should verify the body signature before processing the payload.
The signature is computed the same way: SHA512(webhookBody + API secret).
Webhook deliveries created or rotated after the API secret rollout use the merchant API secret. Existing legacy webhook configurations may continue to verify with the previously issued signing secret until the merchant rotates the API secret.
Test Mode vs Production
Test and production requests use the same API endpoint and the same
authentication mechanism. The environment is determined by which credentials
you use.
- Test credentials create simulated transactions with no real money movement
- Production credentials create real transactions with actual money movement
- Webhooks are delivered in both environments for testing integrations
- All API responses follow the same format in both environments
Rate Limits
API requests may be rate-limited to ensure fair usage. The public MultiHub controller is exempt from the gateway default throttler, so effective limits are configured per merchant, proxy, or deployment policy during onboarding.| Scope | Limit |
|---|---|
| MultiHub API | Confirmed during onboarding; no hard-coded per-method limit is exposed by the public contract |
| Webhook management API | Subject to gateway/API-key policy |
payment.in, payment.out, payment.status, payment.notification, balance.get, and gateway.ping.
If you exceed an applied limit, the response will contain
success: false
with an appropriate error code and message. Contact support if you need a
higher production throughput profile.Error Responses
Authentication errors are returned in the standard response envelope with HTTP 400:Invalid Application ID
Invalid Hash Signature
Best Practices
Use Environment Variables
Store your
application_id and secret_key in environment variables, never
in source codeRotate Keys Regularly
Regenerate your secret key periodically from the dashboard for enhanced
security
Verify Webhooks
Always verify the
X-Data-Hash header on incoming webhooks before
processingMonitor Usage
Track API usage in the dashboard to detect anomalies and stay within rate
limits
