Mobile Payment API Documentation
This documentation provides information about the "Mobile Payment" API, which allows merchants to initiate mobile payments.
Endpoint
POST https://api.secure.payment.loov-solutions.com/v1/payment/payin/mobileRequest Headers
app-key: Your unique application key for authentication.merchant-key: Your unique merchant key for identification.Content-Type:application/jsonAccept:application/json
Request Body
The request body contains the details required to initiate the mobile payment.
{
"amount": 500,
"operator": "orange-money-cm",
"phoneNumber": "237690000000",
"customer": {
"name": "Wanda bob",
"email": "bob@gmail.com",
"phoneNumber": "237690000000"
},
"callback_url": "https://webhook.site/a6cf31ad-d570-45d1-9995-3b060b4149be"
}amount: The payment amount.operator: The mobile operator code used for the payment (e.g., "orange-money-cm").phoneNumber: The customer's phone number for the payment.NB: PhoneNumber should always carry the country code. e.g +23769*******customer: Customer details including name, email, and phone number.custom_data: Additional custom data associated with the payment.callback_url: URL for payment notifications (webhook).
Supported Operators
| country | operator | operator_code |
|---|---|---|
| Benin | Mtn | mtn-benin |
| Benin | Moov | moov-benin |
| Cameroon | Orange | orange-money-cm |
| Cameroon | Mtn | mtn-cm |
| Ivory Coast | Mtn | mtn-ci |
| Ivory Coast | Moov | moov-ci |
| Mali | Moov | moov-ml |
| Mali | Orange | orange-money-ml |
| Senegal | Orange | orange-money-senegal |
| Senegal | Expresso | expresso-senegal |
| Senegal | Free | free-money-senegal |
| Senegal | Wave Senegal | wave-senegal |
| Togo | T-money | t-money-togo |
| Congo | MTN Congo | mtn-rdc |
| Congo | AITEL Congo | aitel-rdc |
Success Response
Upon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.
Example success response:
{
"error": false,
"status": "FAILED",
"amount": "500",
"fees": 10,
"message": "Paiement e la clientele done. The devrez confirmer le paiement en saisissant son code PIN et vous recevrez alors un SMS. Merci d'utiliser des services Orange Money.",
"reference": "LOMoac3hqZXuBHUHKy8"
}error: A boolean indicating whether an error occurred (falsein this case).status: The status of the payment (e.g., "FAILED").amount: The payment amount.fees: Any fees associated with the payment.message: A message indicating the payment status and instructions for the customer.reference: The reference code of the payment.
Example Usage
cURL
curl -X POST "https://api.secure.payment.loov-solutions.com/v1/payment/payin/mobile" \
-H "app-key: YOUR_APP_KEY" \
-H "merchant-key: YOUR_MERCHANT_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"amount": 500,
"operator": "orange-money-cm",
"phoneNumber": "237690000000",
"customer": {
"name": "Wanba bob",
"email": "bob@gmail.com",
"phoneNumber": "237690000000"
},
"callback_url": "https://webhook.site/a6cf31ad-d570-45d1-9995-3b060b4149be"
}'Conclusion
The "Mobile Payment" API enables merchants to initiate mobile payments. Ensure to handle the response appropriately in your application to provide users with accurate payment status information.
Remember to replace placeholders (YOUR_APP_KEY, YOUR_MERCHANT_KEY) with your actual credentials when making API requests.