Authentication
Authentication
- Compute
X-Data-Hashcorrectly assha512(requestBody + secretKey) - Send required
X-Data-Application-Idand a correctX-Data-Hash; if testing replay proof, send bothX-Data-TimestampandX-Data-Nonce - Verify
gateway.pingreturns a successful response - Confirm your key has the scopes for every method you call — a missing scope returns
3000, like a bad signature (Key scopes) - Store credentials securely (environment variables, not hardcoded)
Payment Creation
Payment Creation
- Create deposit payments (
payment.in) successfully - Create withdrawal payments (
payment.out) successfully - Handle error responses gracefully (check
successfield) - Store
h_idfrom response for subsequent status queries - Send unique
c_idper payment to avoid duplicates (error 6009) - After a create rejected during processing (
9000without details,6004,6005,6006,6035,7001,2001), send the corrected request with a newc_id(Idempotency) - Send the first and last name in separate fields:
person.first_nameandperson.last_name
Payment Status
Payment Status
- Retrieve payment status using
payment.statuswithh_id - Handle all status values:
created,processing,success,error,canceled,declined,refunded,partially_refunded - Check the
finalfield to determine if a payment has reached a terminal state - Check the
successfield to determine if a final payment was successful
Webhooks
Webhooks
- Receive webhook notifications
- Verify webhook signatures
- Handle payment completion events
- Handle payment failure events
- Process events idempotently
Error Handling
Error Handling
- Success returns HTTP 200; errors usually return HTTP 400 (some use 403/404/409/429/5xx) — always check
successfield - Handle error code 3000 (authentication error / invalid signature)
- Handle error code 3003 (application not found)
- Handle error code 2002 (no route available)
- Handle error code 6004 (insufficient funds for withdrawals)
- Handle error code 1005 (missing or invalid fields)
- On network timeouts and
5xx, querypayment.statuswith the samec_idfirst; retry the create with thatc_idonly if it returns6010
Amounts and limits
Amounts and limits
- Send amounts as integers in minor units of the currency (
BIFhas no decimals) - Validate amounts against the limits of each
service_id— out-of-limit amounts return9000without details - Reconcile with the amount in the webhook: on some routes the paid amount can differ from the requested one
Country specifics
Country specifics
- Send the country-specific fields listed on your country page
- Show the payer what the response returns: page, bank details, QR or instruction (Deposit flow types)
- Store full recipient details of withdrawals —
payment.statusand webhooks do not returnreceiver.bankorcustom_fields - Go through the “Things to know” section of your country page
Balance
Balance
- Check balance using
balance.getbefore withdrawals - Handle insufficient funds errors (error code 6004)
Switch to production
1
Complete Testing
Ensure all checklist items pass with the test credentials and routes assigned to your account
2
Request Production Credentials
Contact your 123hub account manager or support@123hub.pro to request production
application_id and secret_key3
Update Configuration
Replace test
application_id and secret_key with production credentials in your production environment4
Update Webhook URLs
Ensure webhooks point to your production server
5
Monitor
Watch the dashboard for your first live transactions
