← Back to Blog
Deep DiveMarch 16, 202511 min read

Cash Flow Categorization API for Lending & Credit Decisioning

How AI-powered transaction categorization helps lenders verify income, assess affordability, and make faster credit decisions with structured cash flow data.

Lenders have access to more transaction data than ever before. Open banking feeds, bank statement uploads, and payroll integrations provide a firehose of raw financial activity. But raw transactions are nearly useless for credit decisions. A cash flow categorization API transforms this data into structured categories -- income, rent, loan repayments, gambling, subscriptions -- that underwriting models can actually consume.

Why Lenders Need Categorized Cash Flows

Traditional credit decisioning relies on credit bureau scores and self-reported income. These signals are limited: bureau scores are backward-looking, and self-reported income is often inaccurate. Transaction-based underwriting (also called cash flow underwriting) provides a real-time view of a borrower's financial health.

But to use transaction data for underwriting, you need to categorize it first. A transaction described as "DIRECT CREDIT 032841 ACME CORP" is meaningless to a model unless it is labeled as "Salary Income." Similarly, "DD BETFAIR.COM 8827" needs to be flagged as "Gambling" to properly assess risk.

What categorization enables:

  • Income Verification: Identify salary deposits, freelance income, government benefits, and rental income. Distinguish regular income from one-time transfers.
  • Affordability Assessment: Calculate fixed commitments (rent, existing loans, insurance) vs. discretionary spending to determine true disposable income.
  • Risk Signal Detection: Flag gambling activity, payday loan usage, returned payments, and overdraft patterns that indicate financial stress.
  • Regulatory Compliance: Meet responsible lending obligations by demonstrating thorough income and expenditure analysis.

How Cash Flow Categorization Works

A cash flow categorization API processes an array of bank transactions and returns each one tagged with a category, subcategory, and confidence score. The best APIs use AI models trained on millions of real bank transactions rather than simple keyword matching, which fails on the messy, abbreviated descriptions that banks generate.

Sending Transactions for Categorization

curl -X POST https://api.easyenrichment.com/enrich \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transactions": [
      {
        "description": "DIRECT CREDIT 032841 ACME CORP",
        "amount": 3500.00,
        "date": "2025-03-01"
      },
      {
        "description": "DD NATIONWIDE MORTGAGE",
        "amount": -1200.00,
        "date": "2025-03-02"
      },
      {
        "description": "CARD PAYMENT TESCO STORES 2841",
        "amount": -87.50,
        "date": "2025-03-03"
      },
      {
        "description": "DD BETFAIR.COM 8827",
        "amount": -50.00,
        "date": "2025-03-04"
      }
    ]
  }'

Categorized Response

{
  "enriched_transactions": [
    {
      "description": "DIRECT CREDIT 032841 ACME CORP",
      "merchant": "Acme Corp",
      "category": "Income",
      "subcategory": "Salary",
      "amount": 3500.00,
      "is_recurring": true,
      "confidence": 0.97
    },
    {
      "description": "DD NATIONWIDE MORTGAGE",
      "merchant": "Nationwide Building Society",
      "category": "Housing",
      "subcategory": "Mortgage",
      "amount": -1200.00,
      "is_recurring": true,
      "confidence": 0.99
    },
    {
      "description": "CARD PAYMENT TESCO STORES 2841",
      "merchant": "Tesco",
      "category": "Groceries",
      "subcategory": "Supermarket",
      "amount": -87.50,
      "is_recurring": false,
      "confidence": 0.95
    },
    {
      "description": "DD BETFAIR.COM 8827",
      "merchant": "Betfair",
      "category": "Gambling",
      "subcategory": "Online Betting",
      "amount": -50.00,
      "is_recurring": true,
      "confidence": 0.98
    }
  ]
}

Integration Patterns for Lending Platforms

There are three common patterns for integrating cash flow categorization into a lending workflow:

1. Pre-Decision Enrichment

The most common pattern. After collecting bank data via open banking or statement upload, send all transactions to the categorization API before running your decisioning engine. This adds 1-3 seconds to the application flow but gives your model structured features to work with.

// Pre-decision enrichment flow
async function processLoanApplication(applicationId) {
  // 1. Fetch bank transactions (via Plaid, TrueLayer, etc.)
  const transactions = await bankingProvider
    .getTransactions(applicationId, { months: 3 });

  // 2. Categorize all transactions
  const enriched = await fetch(
    'https://api.easyenrichment.com/enrich',
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ transactions }),
    }
  ).then(r => r.json());

  // 3. Compute cash flow metrics
  const metrics = computeCashFlowMetrics(
    enriched.enriched_transactions
  );

  // 4. Feed into decisioning engine
  return decisioningEngine.evaluate({
    applicationId,
    monthly_income: metrics.avgMonthlyIncome,
    fixed_commitments: metrics.fixedCommitments,
    disposable_income: metrics.disposableIncome,
    gambling_flag: metrics.hasGambling,
    payday_loan_flag: metrics.hasPaydayLoans,
    income_stability: metrics.incomeVariance,
  });
}

2. Batch Processing for Portfolio Review

For existing loan portfolios, run categorization on updated bank feeds nightly to detect early warning signs like new gambling activity, missed rent payments, or income loss. This powers proactive collections and portfolio risk monitoring.

3. Real-Time Webhook Enrichment

If your banking provider sends transactions via webhooks, enrich each transaction as it arrives. This enables real-time affordability dashboards for borrowers and instant alerts for risk teams.

Key Cash Flow Categories for Lending

Not all categories are equally important for credit decisions. Here are the categories that matter most to underwriting models:

  • Income (Salary, Freelance, Benefits): The foundation of affordability. Models need to identify regular vs. irregular income and calculate stability metrics.
  • Housing (Rent, Mortgage): Usually the largest fixed commitment. Critical for debt-to-income ratio calculations.
  • Existing Debt (Loans, Credit Cards): Identifies current financial obligations that reduce borrowing capacity.
  • Gambling: A key risk signal. Regulators in many jurisdictions require lenders to assess gambling activity as part of affordability checks.
  • Returned Payments / NSF: Indicates cash flow stress. A pattern of bounced payments strongly predicts default risk.
  • Savings / Investments: Positive signals that indicate financial resilience and buffer capacity.

Compliance Benefits

Automated cash flow categorization is not just a convenience -- it is increasingly a regulatory expectation. Here is how it supports compliance:

  • Responsible Lending: Regulators like the FCA (UK), CFPB (US), and ASIC (Australia) require lenders to verify income and assess affordability. Categorized bank data provides auditable evidence of this analysis.
  • Anti-Money Laundering: Transaction categorization helps identify unusual patterns -- like large cash deposits or transfers to high-risk entities -- that may trigger AML reporting obligations.
  • Fair Lending: Using objective, data-driven cash flow analysis rather than subjective assessments helps demonstrate fair treatment of applicants across demographic groups.
  • Audit Trails: Every categorized transaction with its confidence score creates a clear audit trail showing how affordability was assessed, which regulators can review during examinations.

Accuracy Matters: AI vs. Rules

Rule-based categorization (keyword matching) typically achieves 70-80% accuracy on real bank data. This means 1 in 5 transactions is miscategorized -- a salary deposit labeled as a generic transfer, or a mortgage payment missed entirely. In lending, these errors directly impact credit decisions.

AI-powered categorization, like Easy Enrichment's model, achieves 95%+ accuracy by understanding context, abbreviations, and transaction patterns. The model recognizes that "BACS CREDIT 032841 REF SALARY" is income even though it contains no company name, and that "PAYPAL *BETFAIR" is gambling despite being processed through PayPal.

Getting Started

Integrating cash flow categorization into your lending platform takes hours, not weeks. The API accepts standard transaction fields (description, amount, date) and returns categorized results. No model training, no data labeling, no ML infrastructure required.

  • Step 1: Sign up for an API key at the Easy Enrichment dashboard.
  • Step 2: Send a batch of test transactions to the /enrich endpoint.
  • Step 3: Review the categorized output and map categories to your underwriting model's feature schema.
  • Step 4: Integrate into your application flow (pre-decision, batch, or real-time webhook).

Build Better Credit Decisions

Start categorizing cash flows in minutes. Get 100 free API calls to test with your own transaction data. No contracts, no minimums.

Get Your API Key →