/v3/statements/analyze
statements:write
Analyse Statement
Analyse a statement and return cash-flow metrics + affordability signals.
Try it
Sandbox returns deterministic mock data, no wallet charge. Checking Live availability…
Request body
Body parameters
| Field | Type | Description |
|---|---|---|
statement_typerequired |
string | MPESA | TILL | PAYBILL | BANK. |
referencerequired |
string | The account / phone / till reference to analyse. |
Example responses
200 · Result
{
"request_id": "req_8f2c1a9b7d3e4f60",
"ok": true,
"data": {
"months": 6,
"avg_monthly_inflow_kes": 84200,
"avg_monthly_outflow_kes": 71050,
"volatility": "LOW",
"affordability_kes": 13150
}
}
400 · Bad request
{
"error": "invalid_request",
"message": "statement_type and reference are required"
}
401 · Unauthorized
{
"error": "unauthorized",
"message": "API credentials required. Send Authorization: Bearer <client_id>:<secret>."
}
Runs use your signed-in session. For system-to-system integration, issue a keypair in the
Console and send
Authorization: Bearer <client_id>:<secret> against
https://credit.farmsky.africa (Sandbox https://sandbox.credit.farmsky.africa).