Verify an M-Pesa agent
Verify a Kenyan M-Pesa agent by agent code.
Headers
- Type: stringIdempotency
- Key min length:1max length:255requiredRequired for verification mutations. Use a unique printable ASCII key per logical request; retries with the same key return the original response.
Body·
required
application/json
- Type: stringagent
Code min length:1requiredM-Pesa agent code to verify
- Type: stringcountrymin length:2max length:2
ISO 3166-1 alpha-2 country code. Defaults to KE.
- Type: stringenummode
syncreturns the verification result in the response.asyncreturnspendingand delivers the final result via your registered webhooks (configure under/webhooks).values- sync
- async
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/verify/mpesa-agent
curl https://api.lira.com/api/v1/verify/mpesa-agent \
--request POST \
--header 'Idempotency-Key: verify-request-20260504-001' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_SECRET_TOKEN' \
--data '{
"agentCode": "123456",
"country": "KE",
"mode": "sync"
}'
{
"id": "a7b8c9d0-e1f2-3456-abcd-789012345678",
"status": "success",
"verificationType": "MPESA_AGENT",
"identifier": "123456",
"country": "KE",
"verifiedAt": "2026-04-22T10:15:30.000Z",
"verified": true,
"origin": "api",
"agentCode": "123456",
"agentName": "Jane Doe Enterprises",
"agentAccount": "0712345678",
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent code not registered with M-Pesa"
}
}