Spending Patterns

Create a better experience with Spending Patterns

The insatiable wants of the average human being and the constant rise in prices of things create a complex spending culture. Budgeting aside, the average individual, self-employed or otherwise, will pay bills such as electricity, internet/phone service, fuel, transportation, religious dues, black tax (family/friends billings), etc.

As individuals or businesses building Fintech solutions rely on customers' financial data, the complex spending culture of users presents an opportunity to your business model but imposes questions such as:

  • What are the user's average monthly expenses?
  • What is this user's committed monthly spending?
  • What are the categories of user expenses?
  • What does a user spending pattern look like?
    …and many more!

These questions are paramount to a business and demand a realistic and scalable platform to provide this information. Unfortunately, traditional banks are not readily able to provide this detailed information. Thankfully, Okra's Spending Patterns product can help with valuable insights into a customer's spending data!

Key benefits to your business

But why should you care about spending patterns, how would it benefit your business or your project? What additional insights from the spending pattern service can help businesses know which products or services to offer a customer.

The Okra Spending pattern services do the following;

  • Gives a breakdown of the channels used for debit transactions such as;
    - Cash, Transfer, PoS
  • Groups debit transactions into 19 different categories including;
    - Gambling, Health, Entertainment, Housing Etc.
  • Gives the count, average, maximum, minimum, and sum of each spending pattern category
  • Identifies recurrent expenditure and frequency of repetition;
    - Weekly, bi-weekly, monthly

Use Cases of Spending Pattern

Budget management
Fintechs with budgeting services can harness this product to get insights into their customer's spending patterns seamlessly without building any infrastructure. Our Spending Patterns product provides a plug-and-play solution that accelerates time-to-market.

Credit Decisioning
Lending platforms can utilize spending patterns to estimate the income of a customer in order to accept or deny loan applications. This streamlines the user experience, significantly reduces operational costs, and makes it easier for lenders to assess potential borrowers.

Investment allocation
Wealth management firms can make more relevant investment offers based on their users’ income and spending patterns, improving conversion and user experience.

How to add Spending Patterns to your project?

You get a breakdown of expenses per category and real-time insights based on expenses after monthly income.
The Spending Patterns product fetches the user’s banking data and produces categorized insights on their spending patterns via the user's consent to access their bank account in an application. Implementing the spending pattern feature on your project is simple.

To integrate,

  1. Visit here and signup.
  2. After verification, log in.
  3. Get your secret keys
  4. Test on Postman

Launch your postman app, and let's test it there.

Use this endpoint 👉🏻 https://api.okra.ng/v2/products/complete-view/process

  • Create a customer on your dash, autogenerate a customer.
  • Grab the customer's Id.

Payload Explanation

  • customer_id[Required] - customer ID to be used to compute spending pattern
  • interval[Optional] - determines the interval you want the spending pattern to be calculated. Default is monthly
  • channel_filter[Optional] - if you want to focus on a particular channel of spending.
    - Values: Transfer, USSD, Cash, Web_pos
  • start_date: if you want spending pattern calculation to start at a particular date
  • end_date: If you want the spending pattern to end at a particular date
curl -X POST https://api.okra.ng/v2/products/spending-patterns/process
-H 'Content-Type: application/json' 
-H 'Authorization: Bearer <AccessToken>'
-d '{
    "customer_id": "xxxxxxxxx",
    "interval": "monthly",
    "channel_filter": "Transfer",
    "start_date": "YYYY-MM-DD",
    "end_date": "YYYY-MM-DD"
    }'
{
    "data": {
        "breakdown": {
            "channel": {
                "Cash": {
                    "count": 40,
                    "max": 100800.0,
                    "min": 1000.0,
                    "percentage": 1.71,
                    "sum": 220116.12
                },
                "Transfer": {
                    "count": 118,
                    "max": 2516000.0,
                    "min": 0.02,
                    "percentage": 96.84,
                    "sum": 12485350.6
                },
                "web_pos": {
                    "count": 25,
                    "max": 40512.0,
                    "min": 1216.87,
                    "percentage": 1.04,
                    "sum": 133983.64
                }
            },
            "pattern": {
                "food": {
                    "count": 10,
                    "max": 40512.0,
                    "min": 2800.0,
                    "percentage": 0.97,
                    "sum": 125026.17
                },
                "housing": {
                    "count": 1,
                    "max": 1200000.0,
                    "min": 1200000.0,
                    "percentage": 9.31,
                    "sum": 1200000.0
                },
                "medical": {
                    "count": 1,
                    "max": 2100.0,
                    "min": 2100.0,
                    "percentage": 0.02,
                    "sum": 2100.0
                },
                "miscellaneous": {
                    "count": 18,
                    "max": 76500.0,
                    "min": 10.0,
                    "percentage": 0.6,
                    "sum": 76989.0
                },
                "personal_care": {
                    "count": 1,
                    "max": 3000.0,
                    "min": 3000.0,
                    "percentage": 0.02,
                    "sum": 3000.0
                },
                "savings": {
                    "count": 1,
                    "max": 2516000.0,
                    "min": 2516000.0,
                    "percentage": 19.52,
                    "sum": 2516000.0
                },
                "subscriptions": {
                    "count": 5,
                    "max": 10946.35,
                    "min": 2757.06,
                    "percentage": 0.23,
                    "sum": 29997.24
                },
                "taxes": {
                    "count": 15,
                    "max": 3.75,
                    "min": 0.5,
                    "percentage": 0.0,
                    "sum": 24.35
                },
                "transportation": {
                    "count": 8,
                    "max": 11700.0,
                    "min": 1216.87,
                    "percentage": 0.2,
                    "sum": 25965.04
                }
            }
        },
        "confidence": 64.63,
        "streams": [
            {
                "average_amount_spent": 312917.22,
                "average_frequency": 21.61,
                "channel": "Transfer",
                "count": 34,
                "pattern": null,
                "period": "tri-weekly"
            },
            {
                "average_amount_spent": 25013.44,
                "average_frequency": 0.6,
                "channel": "Transfer",
                "count": 6,
                "pattern": null,
                "period": "daily"
            },
            {
                "average_amount_spent": 4116.34,
                "average_frequency": 19.7,
                "channel": "web_pos",
                "count": 11,
                "pattern": null,
                "period": "tri-weekly"
            },
            {
                "average_amount_spent": 2312.5,
                "average_frequency": 7.0,
                "channel": "web_pos",
                "count": 8,
                "pattern": null,
                "period": "weekly"
            },
            {
                "average_amount_spent": 1000.0,
                "average_frequency": 29.3,
                "channel": "Cash",
                "count": 24,
                "pattern": null,
                "period": "monthly"
            },
            {
                "average_amount_spent": 175.27,
                "average_frequency": 23.0,
                "channel": "Transfer",
                "count": 31,
                "pattern": null,
                "period": "tri-weekly"
            }
        ],
        "summary": {
            "channel": {
                "max": 2516000.0,
                "min": 0.02,
                "sum": 12892506.71
            },
            "debit_count": 188,
            "last_year_total": 1386542.42,
            "last_year_total_minus_tax": 1386541.92,
            "pattern": {
                "max": 2516000.0,
                "min": 0.02,
                "sum": 12892506.71
            }
        }
    },
    "status": "success"
}

Response Object Explanation:

  • Confidence Score: This is a measure of how accurate the spending data values are.
  • Channel: A breakdown of the channels used for debit transactions like Cash, PoS, Transfer.
  • Pattern: This is the spending patterns of the user, such as food, transportation, etc.

Calculate a Customer's Spending Patterns

Okra’s machine-learning models are constantly evolving to provide the best APIs for you. With Spending Patterns, you get insight into how users spend over time.

📘

Not a Developer?

You can turn on Spending Patterns by simply toggling a switch within the Add-on tab or the inner Transactions page of any of your customers.


What's Next
Did this page help you?