USSD

The Klasha USSD Payment API allows businesses to accept payments via USSD codes, a method especially effective in regions with limited access to the internet.

Follow these steps to accept payment using our USSD API:

  • Initiate the USSD Payment

  • Steps to Complete Payment

  • Check Status

Coverage

The gateway parameter should be set to anyone of the following currencies.

Country
Country Code
Currency

Nigeria

NGN

NGN

Bank Codes

Code

Bank Name

737

GTB

894

First Bank

966

Zenith Bank

919

UBA

909

Stanbic Bank

5037

VFD

7797

Rubies (Highstreet)

901

Access Bank

822

Sterling Bank

7799

Unity Bank

7111

KeyStone Bank

326

EcoBank

945

Wema Bank

770

Fidelity Bank

329

FCMB

745

Heritage Bank

826

Union Bank

Initiate the USSD Payment

POST {{env_url}}/pay/aggregators/{{gateway}}/ussd

You would need to pass, as header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

Headers

Name
Value

Content-Type

application/json

x-auth-token

Your merchant public key

Request Body (encrypted)

Encryption algorithm here

{
    "message": "encrypted-body"
}

Request Body (plain)

{
    "tx_ref": "91a4f37c-61f5-48a6-bef6-ec2ef118615b",
    "account_bank": "329",
    "amount": "3448.28",
    "currency": "NGN",
    "email": "test@dev.com",
    "phone_number": "234888888888",
    "sourceCurrency": "NGN",
    "firstName": "tester",
    "lastName": "one",
    "fullname": "tester one"
}

Response

{
    "message": "success"
    "data": {
        "payment_type": "USSD",
        "tx_ref": "91a4f37c-61f5-48a6-bef6-ec2ef118615b",
        "chargeResponseCode": "pending",
        "charged_amount": "3448.28",
        "narration": "USSD Payment",
        "status": "pending",
        "ussdString": "*329*000*3668#"
    },
    "status": "success"
}

Steps to Complete Payment

  1. Retrieve the USSD String: Once the payment is initiated, a unique ussdString specific to the bank will be provided in the response.

  2. Dial the USSD Code: Use the returned ussdString to proceed with the transaction. For example, if the string provided is *329*000*3668#, dial it on your phone and press the call button.

  3. Follow On-Screen Instructions: Complete the transaction by following the prompts displayed during the USSD session.

Check Status

Click the "Transaction status" link below to check the status of the transaction by passing your tnx_ref as request body.

Transaction status

Last updated