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.
Last updated
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.
Last updated
Follow these steps to accept payment using our USSD API:
Initiate the USSD Payment
Steps to Complete Payment
Check Status
The gateway parameter should be set to anyone of the following currencies.
Nigeria
NGN
NGN
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
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
Content-Type
application/json
x-auth-token
Your merchant public key
Request Body (encrypted)
{
"message": "encrypted-body"
}
Request Body (plain)
{
"tx_ref": "91a4f37c-61f5-48a6-bef6-ec2ef118615b",
"account_bank": "329",
"amount": "3448.28",
"currency": "NGN",
"email": "[email protected]",
"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"
}
Retrieve the USSD String: Once the payment is initiated, a unique ussdString
specific to the bank will be provided in the response.
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.
Follow On-Screen Instructions: Complete the transaction by following the prompts displayed during the USSD session.
Click the "Transaction status" link below to check the status of the transaction by passing your tnx_ref as request body.