USSD OTP
A seamless and secure way for businesses to verify their users through USSD Code OTP (One-Time Password) verification.
Welcome to Spendo's USSD Code OTP (One-Time Password) Verification API documentation. This API provides a seamless and secure way for businesses to verify their users through USSD Code OTP. By integrating this service, you can enhance the security of user transactions, account verifications, and other sensitive operations.
Key Features:
Real-Time Verification: Ensure that your users are who they claim to be with instant OTP verification via USSD.
Secure Notifications: Receive immediate notifications on the success or failure of the verification process through webhooks.
Simple Integration: Easily integrate this API into your existing systems to enhance user authentication processes.
Getting Started:
To use the USSD Code OTP Verification API, follow these steps:
Set Webhook URL:
Before initiating a request to generate an OTP, you must set a webhook URL on the Spendo dashboard. This URL is where Spendo will send notifications regarding the verification status of your users.
Additionally, you can set a webhook secret, which is used to verify that the webhook request is indeed coming from Spendo.
Initiate OTP Request:
When you initiate a request to generate an OTP for a user, the API will respond with the OTP code and the corresponding USSD code that the user needs to dial.
The user is then prompted to dial the USSD code and input the OTP to complete the verification process.
Webhook Notification:
Once the user successfully verifies the OTP, Spendo will send a webhook notification to the URL you provided in the dashboard.
The notification will include the user's phone number, verification status, and the event type (
USSD_VERIFICATION).
Initiate OTP
POST https://v2.api.getspendo.com/messagingserv/gateway/api/v1/ussd/initiate-verification
Headers
apiKey*
String
The API key that you get from spendo's dashboard.
Request Body
phoneNumber*
String
The phone number of the recipient, formatted as a string without any spaces or special characters. Make sure the number start with + and country code.
{
"success": true,
"message": "Code generated successful",
"code": 0,
"data": {
"id": 11,
"code": "959925",
"expiryDateTime": "2024-08-09T17:19:21.601387",
"businessId": "dd3619844d-5fd9-496c-97b7-25f69e80de1c",
"phoneNumber": "+2347037716490",
"ussdCode": "*384*24005#"
}{
"success": false,
"message": "Error initiaying OTP",
"code": 0,
"data": null
}Last updated