Analysis Webhook / Receiver

# Configuration

To have the webhook configured, kindly send an email to support@spinmobile.co OR log into the system and go to Settings Menu. When sending an email, please specify the following:

  1. Webhook URL
  2. Submission Type
  3. Security Details

# Security

To ensure security, we recommend that the webhook requires authentication. Supported authentication method is Basic Auth. To have this enabled, kindly send the username and password together with the webhook url.

# Submission Types

There are several submission types supported, these include:

  • Full Analysis JSON
  • Scores
  • Full Scores PDF

# Request

Below is a sample response

Description

Field DataType Description
data Dict
document Dict Type of statement processed: Bank or MPESA
last_data Dict Primary dataset used to generate the report
information Dict Basic KYC extracted from the statement
boundaries Dict Age information regarding: Processing and submission
header Dict Total summary of the MPESA statement
body Dict

Detailed information of the statement regarding:

- People one transacts with,

- Internet bundles

- Agents

- Other Lines

- Airtime

- MShwari

- Fuliza

- Fees

- KCB Mpesa

- Paybills

- Buy Goods

scores Dict Super Crunch scores broken into:
- m_score Dict Mobile loan scores
- g_score Dict Long term loan scores
classifications List[Dict]
name String Name of the classification
received Dict
total Number Total received within a classification
highest_who String The highest sender
highest Number Highest amount received
lowest_who String Lowest sender
lowest Number Lowest amount received
last_draw String Date when the last transaction occurred
top List[Dict] Top 5 within the classification
sent Dict
total Number Total sent within a classification
highest_who String The highest sent
highest Number Highest amount sent
lowest_who String Lowest sent
lowest Number Lowest amount sent
last_draw String Date when the last transaction occurred
top List[Dict] Top 5 within the classification
mobile_mfi_trends
MFIs List[Dict]
MobileLenders List[Dict]
income Dict Chart data for income
expenditure Dict Chart data for expenditure
other_lines String Customer lines comma separated

API format

This is the data format submitted to third-party endpoint

{
"file_unique_id": Document Identifier. Helps detect duplicate data,
"file_type": Document Type (Bank or MPESA),
"phone": Phone number if Document is MPESA,
"id_number": ID No if Document is MPESA,
"bank_name": Bank Name if Document is Bank,
"account_number": Account No if Document is Bank,
"duration": Duration of the statement in Months,
"json_data": DATA as shown in “JSON Data Format”,
"timestamp": Date when the document was received,
"state_name": Document Processing Status
}

The json body above is the content you will receive as body content from the request coming from us.