Skip to content
Lira APILira API

Verifications

Verify an M-Pesa agent

post/verify/mpesa-agent

Verify a Kenyan M-Pesa agent by agent code.

Authorization

API key in the X-API-Key header.

Headers

Idempotency-Keystringrequired

Required for verification mutations. Use a unique printable ASCII key per logical request; retries with the same key return the original response.

Body required

agentCodestringrequired

M-Pesa agent code to verify

countrystring

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

modestring

`sync` returns the verification result in the response. `async` returns `pending` and delivers the final result via your registered webhooks (configure under `/webhooks`).

Options: syncasync

Response

idstringrequired
statusstringrequired

Options: pendingsuccessfailederrorinconclusive

verificationTypestringrequired

Options: MPESA_AGENT

identifierstringrequired
countrystringrequired
verifiedAtstring | nullrequired
verifiedboolean | nullrequired
originstringrequired

Where this verification was initiated. `api` = Lira API key (machine-to-machine). `dashboard` = logged-in dashboard user.

Options: apidashboard

agentCodestring | nullrequired
agentNamestring | nullrequired
agentAccountstring | nullrequired
errorobject | nullrequired

Populated only when status is `failed` or `error`

Show child attributes
codestringrequired
messagestringrequired