HubtelDevelopers
Get started

Authentication and accounts

Authenticate with HTTP Basic authentication, and find the credentials, account numbers and base URL each Hubtel API uses.

Updated 27 Nov 2026

Most Hubtel HTTP APIs use HTTP Basic authentication. Payment requests also need the relevant account number. SMPP uses its own connection credentials, and the service fulfilment callback uses IP allowlisting.

Choose credentials for the API you need below. Business APIs use a Hubtel merchant account, and lending uses separate myCreditScore credentials.

Credentials

For HTTP Basic authentication, send the first credential as the username and the second as the password. Use SMPP credentials when binding an SMPP connection.

APIKeysWhere to get them
Payments, payouts and verificationAPI ID and API KeyAPI keys → Payments
Business SMSClient ID and Client SecretAPI keys → SMS
SMPPClient ID and Client SecretAsk your Retail Systems Engineer, then find them under API keys → SMPP
LendingAPI ID and API KeymyCreditScore Lenders Portal (see Lending data)

Your payment keys also cover status checks, refunds, balances, commission services and invoicing.

Set the variables below in your server environment. Keep their values out of source control.

Example variableValue
HUBTEL_API_ID, HUBTEL_API_KEYYour payment API ID and API key
HUBTEL_COLLECTION_ACCOUNTCollection account number
HUBTEL_DISBURSEMENT_ACCOUNTDisbursement account number
HUBTEL_SMS_CLIENT_ID, HUBTEL_SMS_CLIENT_SECRETYour SMS client ID and client secret

These are example environment variable names, not API fields. In guides, replace example.com callback and return URLs with your own routes, use a fresh transaction reference, and replace sample customer details. For tests, use sandbox credentials, hosts and numbers.

Your HTTP client builds the Authorization: Basic base64(username:password) header for you:

curl -u "$HUBTEL_API_ID:$HUBTEL_API_KEY" \
  --get "https://api-txnstatus.hubtel.com/transactions/$HUBTEL_COLLECTION_ACCOUNT/status" \
  --data-urlencode "clientReference=order-1042"

Keep credentials on your server

Never put an API key or client secret in a browser, a mobile app or a public repository. For web payments, create the checkout on your server and send only the checkout URL to the browser (see Online Checkout). Quick Send SMS also accepts keys as query parameters; use the POST endpoints instead, so your keys don't end up in logged URLs.

The published Checkout SDK examples accept credentials in client code. Their credential scope remains unconfirmed; review that limitation before choosing an SDK.

Account numbers

Your merchant account has two account numbers for each branch, listed under Develop → Account IDs. Put the one that matches where the money moves in the request path:

AccountWhat it's forUsed by
Collection (POS sales)Receives customer paymentsReceive Money, Online Checkout, Direct Debit, invoicing, status checks, refunds, transfers out
Disbursement (prepaid)Funds payoutsSend Money, Send to Bank, commission services

To fund payouts from your sales, move money across with a balance transfer.

Base URLs

Each API has its own host. Many accept requests only from allowlisted server IP addresses; see IP allowlisting.

APIBase URL
Receive Money, Direct Debit chargeshttps://rmp.hubtel.com
Direct Debit pre-approvalhttps://preapproval.hubtel.com
Online Checkouthttps://payproxyapi.hubtel.com
Transaction statushttps://api-txnstatus.hubtel.com
Refundshttps://refund-api.hubtel.com
Invoicinghttps://invoicing.hubtel.com
Recurring Invoicehttps://rip.hubtel.com

On this page