Rechargely API

Integrate airtime, data bundles, electricity, and bill payments into your application. Explore our REST API with interactive examples.

Base URL
https://rechargely.online/api/wallet/v1

Authentication

Create API credentials under Developers in the portal. Exchange them using HTTP Basic authentication at /authenticate/api-key. For catalog and payment requests, include Authorization: Bearer <accessToken>, X-Channel-Id: API, and X-Portal-Id: AGENT_PORTAL. Tokens expire after 15 minutes and have no refresh token; exchange credentials again after expiry. Keep API secrets on your backend. Token exchange examples run server-side.

Payment Integration Flow

1POSTAuthenticate
2GETFetch Products
3POSTPre-Auth
4POSTAuthorize

Use one unique requestId throughout each payment. A successful pre-auth validates the bill; authorization moves funds. Authorization results include COMPLETED, PROCESSING, FAILED or REFUNDED. Check your float at any time with GET /partner/wallet/balances. Partner tokens support the wallet balance, catalog and payment endpoints listed below; other portal endpoints are outside this scope.

Authentication

POST/authenticate/api-key Basic Auth

Exchange API Credentials

Create API credentials in the portal Developers tab. Send the API key as the HTTP Basic username and the API secret as the password from your backend. The bearer token lasts 15 minutes (900 seconds) and has no refresh token. In Postman, choose Authorization > Basic Auth and Body > x-www-form-urlencoded.

Required Headers

Authorization
Basic <base64(api-key:api-secret)>
Content-Type
application/x-www-form-urlencoded
X-Channel-Id
API
X-Portal-Id
AGENT_PORTAL

Form Fields (x-www-form-urlencoded)

grant_typestringrequired

Must be client_credentials.

scopestringrequired

Must be bill-payment:write.

Response Fields

accessTokenstring

Use as Authorization: Bearer <accessToken> for the remaining integration steps.

tokenTypestring

Bearer.

expiresInnumber

Token lifetime in seconds (900). Exchange credentials again after expiry.

scopestring

Granted scope: bill-payment:write.

curl -i -X POST 'https://rechargely.online/api/wallet/v1/authenticate/api-key' \
  -u '<api-key>:<api-secret>' \
  -H 'X-Channel-Id: API' \
  -H 'X-Portal-Id: AGENT_PORTAL' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'scope=bill-payment:write'

Example Response (HTTP 200)

{
  "accessToken": "eyJhbGciOiJIUzI1NiIs...",
  "tokenType": "Bearer",
  "expiresIn": 900,
  "scope": "bill-payment:write"
}

Wallet

GET/partner/wallet/balances Bearer Auth

Check Wallet Balances

Return the balance of each wallet (USD and ZWG) belonging to the Agent or Merchant that owns the API key; no account number is sent. Check it before a payment to confirm you have enough float. When Rechargely has set a minimum float for your account, minimumFloat and belowMinimumFloat show it. Falling below the minimum only triggers a notice to you; payments still go through until the wallet itself runs out.

Required Headers

X-Channel-Id
API
X-Portal-Id
AGENT_PORTAL
Authorization
Bearer <partner-token>

Response Fields

currencystring

Wallet currency, USD or ZWG.

accountNumberstring

Your wallet account number.

statusstringnullable

ACTIVE, or why the wallet cannot be used right now.

balancenumbernullable

Available balance. Null when it could not be read just now (never reported as a false zero); retry shortly.

minimumFloatnumbernullable

Minimum float Rechargely asks you to keep in this wallet. Null when none is set.

belowMinimumFloatbooleannullable

True when balance is under minimumFloat. Advisory only: top up soon, payments are not blocked. Null when either value is unknown.

curl -i -X GET 'https://rechargely.online/api/wallet/v1/partner/wallet/balances' \
  -H 'X-Channel-Id: API' \
  -H 'X-Portal-Id: AGENT_PORTAL' \
  -H 'Authorization: Bearer <partner-token>'

Example Response (HTTP 200)

[
  {
    "currency": "USD",
    "accountNumber": "100000012345",
    "status": "ACTIVE",
    "balance": 82.5,
    "minimumFloat": 100,
    "belowMinimumFloat": true
  },
  {
    "currency": "ZWG",
    "accountNumber": "100100012345",
    "status": "ACTIVE",
    "balance": 15400,
    "minimumFloat": null,
    "belowMinimumFloat": null
  }
]

Products

GET/public/products/product/all Bearer Auth

Fetch Products

Fetch the active product catalog and use the selected numeric id as productId in pre-auth. Send the partner bearer token and API headers even though the path contains /public/.

Required Headers

X-Channel-Id
API
X-Portal-Id
AGENT_PORTAL
Authorization
Bearer <partner-token>

Response Fields

idnumber

Numeric product identifier to send as productId.

namestring

Internal product name.

descriptionstring

Product description.

refNamestring

Bill reference label.

billFormatstring

Expected bill reference format.

categorystring

Product category.

statusstring

Product availability status.

billerNamestring

Biller or service provider.

currencystring

Product currency, e.g. USD or ZWG.

productPricenumber

Catalog price for fixed-price products.

productNamestring

Product display name.

providerCodestring

Provider identifier.

pricingTypestring

FIXED uses catalog pricing; VARIABLE requires an amount in pre-auth.

productLogoUrlstringnullable

Product logo URL.

minAmountnumbernullable

Minimum allowed amount.

maxAmountnumbernullable

Maximum allowed amount.

queryCustomerInfoboolean

Whether the product supports customer information lookup.

discountPercentagenumbernullable

Product discount percentage, when available.

curl -i -X GET 'https://rechargely.online/api/wallet/v1/public/products/product/all' \
  -H 'X-Channel-Id: API' \
  -H 'X-Portal-Id: AGENT_PORTAL' \
  -H 'Authorization: Bearer <partner-token>'

Example Response (HTTP 200)

[
  {
    "id": 42,
    "name": "econet_airtime",
    "description": "Econet Airtime",
    "refName": "Mobile Number",
    "billFormat": "07XXXXXXXX",
    "category": "Airtime",
    "status": "ACTIVE",
    "billerName": "Econet Wireless",
    "currency": "USD",
    "productPrice": 0,
    "productName": "Econet Airtime",
    "providerCode": "ECONET",
    "pricingType": "VARIABLE",
    "productLogoUrl": null,
    "minAmount": 0.5,
    "maxAmount": 500,
    "queryCustomerInfo": false,
    "discountPercentage": 0
  }
]

Transactions

POST/transactions/bill-payment/pre-auth Bearer Auth

Validate the Bill (Pre-Auth)

Validate the reference and amount before funds move. Generate a unique requestId for each intended payment and keep it for authorization. Proceed only when responseCode is "00"; a preAuthToken can also be present on a failed response.

Required Headers

X-Channel-Id
API
X-Portal-Id
AGENT_PORTAL
Authorization
Bearer <partner-token>
Content-Type
application/json

Request Body (JSON)

amountnumber

Required for VARIABLE pricing. FIXED pricing uses the catalog price, add-ons and number of months. Respect the product currency and amount limits.

productIdnumberrequired

Numeric id from the product catalog; replace the example with your selected product.

requestIdstringrequired

Client-generated unique payment identifier. Reuse it only for the same payment lifecycle.

billReferencestringrequired

Customer reference in the format required by the product, e.g. a mobile or meter number.

customerMobilestring

Customer mobile number.

additionalDataobject

Product-specific string values using supported keys, e.g. {"NO_OF_MONTHS":"1"} or {"ADDONS":"code1|code2"}. Omit when unused.

Response Fields

responseCodestring

Two-character ISO 8583 code, preserved as a string (e.g. "00", "51", "68"). See Response codes below.

responseMessagestring

Human-readable result; use responseCode for program logic.

requestIdstring

Your payment request identifier, echoed for reconciliation.

productNamestringnullable

Product name, when available.

additionalDataobjectnullable

Product-specific result data, such as CUSTOMER_NAME, TOKEN or KWH. Keys and values depend on the biller.

commissionAmountnumbernullable

Quoted or earned commission, when applicable.

commissionStatusstringnullable

Commission state, when available; pre-auth can return QUOTED or NOT_APPLICABLE.

preAuthTokenstringnullable

Send with the same requestId to authorize, only after a "00" pre-auth result. Pre-auth does not return a status field.

curl -i -X POST 'https://rechargely.online/api/wallet/v1/transactions/bill-payment/pre-auth' \
  -H 'X-Channel-Id: API' \
  -H 'X-Portal-Id: AGENT_PORTAL' \
  -H 'Authorization: Bearer <partner-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 25,
  "productId": 42,
  "requestId": "YOUR-UNIQUE-REF-001",
  "billReference": "0772000000",
  "customerMobile": "0772000000"
}'

Example Response (HTTP 200)

{
  "responseCode": "00",
  "responseMessage": "Preauth Successful",
  "preAuthToken": "preauth_abc123",
  "requestId": "YOUR-UNIQUE-REF-001",
  "productName": "Econet Airtime",
  "additionalData": {},
  "commissionAmount": 0,
  "commissionStatus": "NOT_APPLICABLE"
}
POST/transactions/bill-payment/auth Bearer Auth

Authorize and Fulfil Payment

Submit the preAuthToken and the same requestId to debit the Agent or Merchant wallet and fulfil the payment. HTTP 200 / "00" indicates success. HTTP 202 / "68" with PROCESSING needs reconciliation; do not start a replacement payment for an unknown outcome.

Required Headers

X-Channel-Id
API
X-Portal-Id
AGENT_PORTAL
Authorization
Bearer <partner-token>
Content-Type
application/json

Request Body (JSON)

preAuthTokenstringrequired

Token from a successful pre-auth response.

requestIdstringrequired

The same requestId used during pre-auth.

Response Fields

responseCodestring

Two-character ISO 8583 code, preserved as a string (e.g. "00", "51", "68"). See Response codes below.

responseMessagestring

Human-readable result; use responseCode for program logic.

requestIdstring

Your payment request identifier, echoed for reconciliation.

productNamestringnullable

Product name, when available.

additionalDataobjectnullable

Product-specific result data, such as CUSTOMER_NAME, TOKEN or KWH. Keys and values depend on the biller.

commissionAmountnumbernullable

Quoted or earned commission, when applicable.

commissionStatusstringnullable

Commission state, when available; pre-auth can return QUOTED or NOT_APPLICABLE.

transactionReferenceNumberstringnullable

Payment transaction reference, when available. Preserve it for reconciliation.

productDescriptionstringnullable

Product description, when available.

statusstringnullable

Payment state, e.g. COMPLETED, PROCESSING, FAILED or REFUNDED. Can be null on validation errors; inspect responseCode and HTTP status too.

curl -i -X POST 'https://rechargely.online/api/wallet/v1/transactions/bill-payment/auth' \
  -H 'X-Channel-Id: API' \
  -H 'X-Portal-Id: AGENT_PORTAL' \
  -H 'Authorization: Bearer <partner-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "preAuthToken": "preauth_abc123",
  "requestId": "YOUR-UNIQUE-REF-001"
}'

Example Response (HTTP 200)

{
  "responseCode": "00",
  "responseMessage": "Transaction successful",
  "transactionReferenceNumber": "TXN-2026-00001234",
  "status": "COMPLETED",
  "requestId": "YOUR-UNIQUE-REF-001",
  "productName": "Econet Airtime",
  "productDescription": "Econet Airtime",
  "additionalData": {},
  "commissionAmount": 0,
  "commissionStatus": "NOT_APPLICABLE"
}

Response codes and error handling

Bill-payment results use a two-character ISO 8583 responseCode and a matching HTTP status. Preserve leading zeroes and parse the body on non-2xx responses too. HTTP status 200 is distinct from payment code "00". Pre-auth and authorization failures retain their endpoint response fields; unavailable values can be null.

Example: HTTP 422, insufficient funds

{
  "responseCode": "51",
  "responseMessage": "Insufficient wallet balance",
  "requestId": "YOUR-UNIQUE-REF-001",
  "preAuthToken": null,
  "productName": null,
  "additionalData": {},
  "commissionAmount": null,
  "commissionStatus": null
}
responseCodeHTTP statusMeaning
00200Approved or completed successfully
03500Invalid merchant or biller configuration
05422Transaction declined
06502Transaction processing error
12422Invalid transaction
13422Invalid amount
14422Invalid bill reference
25404Transaction record not found
30400Request format is invalid
46422Account is closed
51422Insufficient funds
57422Transaction not permitted to account holder
58403Transaction not permitted to channel
61422Transaction amount limit exceeded
63403Security violation
65422Transaction frequency limit exceeded
68504Pre-auth: response received too late
68202Authorization: outcome pending reconciliation; not a completed payment
76422Invalid or unavailable account
79422Transaction reversed; the wallet debit was reversed (REFUNDED)
84410Pre-authorization has expired
84409Invalid authorization lifecycle
91503Biller or processing switch is unavailable
92502Unable to route transaction
94409Duplicate transaction
96500System malfunction

Pending outcomes, reversals and retries

Authorization can return HTTP 202 with responseCode: "68" and status: "PROCESSING". This outcome is awaiting reconciliation. Code "68" during pre-auth instead maps to HTTP 504. Code "79" / HTTP 422 with REFUNDED means the wallet debit was reversed. Code "84" distinguishes an expired pre-auth (410) from an invalid authorization lifecycle (409).

{
  "responseCode": "68",
  "responseMessage": "Transaction outcome is pending reconciliation",
  "transactionReferenceNumber": "TXN-2026-00001234",
  "status": "PROCESSING",
  "requestId": "YOUR-UNIQUE-REF-001",
  "additionalData": {}
}

Retain every response, requestId, preAuthToken and transactionReferenceNumber. Repeated authorization of an already completed payment can return the existing "00" result; a reversed payment returns "79" and an in-progress payment returns "68". Do not generate a new requestId to retry an uncertain authorization. Contact support before retrying when the outcome is unknown, including network timeouts. A single partner payment cannot yet be queried by requestId, and self-service outbound webhook registration is not available.

Authentication and request errors

Token exchange rejects invalid credentials, scope, grant type or channel/portal values with HTTP 401:

{
  "error": "invalid_client",
  "errorDescription": "Invalid API credentials"
}

HTTP 401 also covers invalid or expired partner tokens and inactive credentials. HTTP 403 can indicate an endpoint outside the partner scope or a portal mismatch. Missing required headers or form fields and malformed JSON can return HTTP 400. Authentication filters and framework-level errors may use a different body from bill-payment results; do not assume every error contains responseCode.

Rechargely API v1 · Need help? Contact support