This document guides frontend/UI developers on how to integrate with the MPay v2 backend API.
https://api.mpay.africa/api
All protected routes require Bearer Token:
Authorization: Bearer {token}
Accept: application/json
POST /auth/register
{
"account_type": "personal",
"name": "John Doe",
"email": "john@example.com",
"phone": "254712345678",
"password": "password123"
}
POST /auth/verify-email
{
"email": "john@example.com",
"otp": "123456"
}
POST /auth/login
{
"email": "john@example.com",
"password": "password123"
}
POST /auth/set-pin
{
"pin": "1234"
}
POST /auth/complete-kyc
Use multipart/form-data:
GET /auth/onboarding-status
GET /auth/dashboard/summary
{
"user": {
"name": "skysoft",
"email": "dennisdeveloper3@gmail.com",
"vendor_id": 231
},
"wallets": {
"service_wallet": 0,
"payments_wallet": 4870,
"currency": "KES"
},
"payment_channels": [],
"recent_transactions": [],
"payment_link": {
"url": "https://api.mpay.africa/payme/231",
}
}
POST /transactions/payins
{
"amount": 500,
"phone": "254712345678",
"country": "KE",
"network": "MPESA"
}
POST /transactions/payouts
{
"amount": 1000,
"phone": "254712345678",
"country": "KE",
"network": "MPESA",
"reference": "INV-1001"
}
GET /reports/overview
{
"total_inbound": 7897765.92,
"total_outbound": 7760997.42,
"total_transactions": 67033,
"total_customers": 5196
}
POST /clientele/sync
Generates unique customers from transaction history.
GET /clientele
GET /payment-channels
POST /payment-channels
{
"channel_type": "paybill",
"channel_id": "4124297",
"account": "Customer"
}
PATCH /payment-channels/{id}/toggle
GET /payment-links
POST /payment-links
{
"title": "Website Payment",
"amount": 2500
}
GET /payme/{vendor_id}
No authentication required.
POST /auth/logout