Submission / Upload
# Request Parameters
The following parameters are expected:
Field | Description | Type |
---|---|---|
id_no | Client's national identity number, enables the querying of services like IPRS and CRB | String |
client_name | Client's name eg. John Doe | String |
phone_number | Client's phone number eg. 07******** | String |
client_type | This identifies the client type, either a CORPORATE or an INDIVIDUAL | String |
organization_code | This is an identifier for the organization. This will be provided by the Spin Mobile Team | String |
document_type | The type of statement to be processed. Supported: MPESA , BANK , AIRTEL | String |
bank*code | An identifier for the specific bank. _Example* ABSA , KCB , COOP , EQUITY . Refer below for the full list. | String |
sender | An identifier for the mode of submission. Example LMS_API , email@spinmobile.co . | String |
decrypter | E-Statement password. Send blank if the file is not encrypted. Example 123456 | String |
remote*identifier | An external reference to help identify the customer while submitting data to the client system. _Example* ID Number | String |
Please find sample implementation on the left
# Supported Banks
The following are the supported banks:
Bank / MFB | Code |
---|---|
Centenary Bank | CENTENARY |
UBA Bank | UBA |
Co-operative Bank | COOP |
Kenya Commercial Bank | KCB |
HFC Bank | HFC |
Equity Bank | Equity |
NATIONAL Bank | NBK |
NIC Bank | NIC |
SBM Bank | SBM |
SIDIAN Bank | SIDIAN |
DTB Bank | DTB |
CREDIT Bank | CREDIT |
FAULU Bank | FAULU |
Standard Chartered Bank | SCB |
Rafiki MFB | RAFIKI |
Kingdom Bank | KINGDOM |
Faulu MFB | FAULU |
Credit Bank | CREDIT |
Fortune Bank | FORTUNE |
NCBA Bank | NCBA |
NCBA Loop | NCBALoop |
Habib Bank | HABIB |
Prime Bank | PRIME |
I&M Bank | INM |
Stanbic Bank | STANBIC |
GT Bank | GT |
Family Bank | FAMILY |
Post Bank | POSTBANK |
U&I MFB | UNI |
SMEP | SMEP |
HF Bank | HF |
Kenya Women MFB | KWFT |
ABSA Bank | ABSA |
Bank of Africa | BOA |
Gulf | Gulf |
TNSACCO | TNSACCO |
WINAS | WINAS |
Consolidated Bank | CONSOBK |
CARITAS | CARITAS |
Please Note: The list of supported is always changing as new banks are incorporated. To check the latest added banks log into the system, go to Banks Menu and click on Upload Statement
# Supported Document Types
The following are the supported statement types:
E-Statement | Document Type |
---|---|
MPESA Statement | MPESA |
Bank Statement | BANK |
MPESA Till | TILL |
MPESA Paybill | PAYBILL |
# Response
E-statement submission is an asynchronous process where the statement is submitted first, then the results are sent back to the client through a webhook. On submission, below is a sample response
Description
Field | DataType | Description |
---|---|---|
code | String | A success or failure error code. |
message | String | A description of the results, indicating the number of documents uploaded successfully and any that failed |
unique_identifier | String | On a successful submission, a string is returned with the merged statements unique id. This unique id can be used to query the merged statements status or analysis later on. |
upload_error | List | On submission, a list is returned with the statements whose upload failed. Its contains document dict which identifies the failed statement and an error dict that indicates why the upload failed. The list is empty if none failed. |
API format
This is the data format submitted to third-party endpoint
{
"code": "100.000.000",
"message": "2 Documents Uploaded Successfully. 1 Document failed to upload",
"unique_identifier": "some_text",
"upload_error": [
{
"document": {
"document_key": "file_3",
"document_type": "BANK",
"decrypter": "",
"bank_code": "NCBA",
"sender": ""
},
"error": {
"code": "600.003.004",
"message": {
"id": "some_text",
"info": "file already exist"
}
}
}
]
}