This endpoint allows you to upload Mpesa Statements for extraction, analysis and scoring
Headers
Name
Type
Description
Authentication*
string
Authentication token to track down API usage.
Request Body
Name
Type
Description
national_id*
String
User's national ID
file*
String
Base64 encoded file string
file_name*
String
Unchanged Mpesa Statement Name
callback_url*
String
Where to send result
statement_type*
String
Statement being uploaded only one of three user_statement, paybill_statement, till_statement
kyc_data*
Object
User KYC data
gender*
String
Customer gender (Male or Female)
name*
String
Customer name
location*
String
customer location
dob*
String
Customer date of birth (1999-06-28)
{"status": 202,"message": "Statement saved successfully. Extraction process initiated","data":{"reference_id":"22050643-73b9-4eec-ac73-4572d643ac1c","name":"ANTHONY KAMAU","phone_number":"254700123456""statement_type": "user_statement","short_code":null,"statement_period":"17 Oct 2022 - 17 Jan 2023" }}
{"status":400,"message":"Fraud flags detected","errors":[ {"message":"Author is not available" }, {"message":"Creation Date is not available" }, {"message":"Creator is not available" }, {"message":"Title is not available" }, {"message":"Subject is not available" }, {"message":"Invalid producer: www.ilovepdf.com" } ]}