Appearance
Send OTP
The Send OTP API is a mandatory pre-authorization step that occurs before initiating the Mobile Money Collection API.
When a merchant intends to debit a customer’s mobile money wallet, the merchant must first send a One-Time Password (OTP) to the mobile number that will be charged. The payer must successfully verify the OTP before the collection request can be processed.
💡Why is this necessary?
This ensures:
- Explicit payer consent
- Reduced fraud risk
- Strong customer authentication
- Regulatory compliance
| Field Name | Structure/Key | Type | Description |
|---|---|---|---|
| Customer Contact | customer_contact | string | The customer’s active mobile money number to be debited. |
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{BaseURL}}/send-otp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"customer_contact": "+2335XXX"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer YOUR_SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;js
var request = require('request');
var options = {
'method': 'POST',
'url': '{{BaseURL}}/send-otp',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_SECRET_KEY'
},
body: JSON.stringify({
"customer_contact": "+2335XXX"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});bash
curl --location '{{BaseURL}}/send-otp' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--data '{
"customer_contact": "+2335XXX"
}'Response
