This endpoint allows you to request a payment from customers by using their phone number enabled for mobile money.
For some mobile money accounts, Lenco would require the customer to verify the phone number before the payment is triggered. In this scenario, Lenco would send an OTP to the customer's phone number and the status of the collection request would be otp-required
.
This OTP should be collected and passed to the Submit OTP API endpoint to proceed with the collection request. In the sandbox environment, use 000000
as the OTP.
At the point of payment, the customer is required to authorize the payment on their mobile phones. The status of the collection request would be pay-offline
.
Once you get this status, you should notify the customer to complete the authorization process on their mobile phones and then listen for webhook notification or requery the collection request status endpoint at interval.
Response Schema:
{
"status": boolean,
"message": string,
"data": {
"id": string,
"initiatedAt": date-time,
"completedAt": date-time | null,
"amount": string,
"fee": string | null,
"bearer": "merchant" | "customer",
"currency": string,
"reference": string,
"lencoReference": string,
"type": "mobile-money",
"status": "pending" | "successful" | "failed" | "otp-required" | "pay-offline",
"source": "api",
"reasonForFailure": string | null,
"settlementStatus": "pending" | "settled" | null,
"settlement": null,
"mobileMoneyDetails": {
"country": string,
"phone": string,
"operator": string,
"accountName": string | null,
} | null,
"bankAccountDetails": null,
"cardDetails": null,
}
}
You can use any of the accounts listed here to test mobile money collections in the sandbox environment