Verify an M-Pesa agent

Verify a Kenyan M-Pesa agent by agent code.

Headers
  • Idempotency-Key
    Type: string
    min length:  
    1
    max length:  
    255
    required

    Required 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
  • agentCode
    Type: string
    min length:  
    1
    required

    M-Pesa agent code to verify

  • country
    Type: string
    min length:  
    2
    max length:  
    2

    ISO 3166-1 alpha-2 country code. Defaults to KE.

  • mode
    Type: stringenum

    sync returns the verification result in the response. async returns pending and 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"
  }
}