How to Generate Cash Flow Reports from Xero When the API Doesn’t Offer It (Yet)

How to Generate Cash Flow Reports from Xero When the API Doesn’t Offer It (Yet)

You’ve most likely encountered this obstacle if you’ve ever attempted to develop an automated reporting engine or real-time financial dashboard on top of Xero:

I Googled for “Xero Cash Flow API,” and Google showed me the top-most relevant page.

Google search result for Xero cash flow API showing Financial Statements Xero Finance API link and description.
Xero Finance API documentation showing GET FinancialStatements Cashflow endpoint with query parameters for start and end date.

Wow, Xero Cash Flow API Exists!! 🙂 But…

Xero provides an API for cash flow as part of their Finance API. It’s not part of Accounting API.

What It Offers:

  • GET /financialstatements/cashflow
  • Returns categorized cash movements (Operating, Investing, Financing)
  • XML and JSON formats
  • Includes company-specific classifications and chart mappings

But There’s a Catch:

Access is not public by default.

To use the Finance API, developers must:

  • Only usable for Lending Application use case
  • Submit a formal request to Xero (via this Finance API request form):
    Finance API Overview
  • Obtain approval based on the use case, compliance, and integrity of integration.
  • Not available for USA organizations.
Screenshot of Xero financial services partnership form with email, name, organization, and location input fields.

So while the endpoint exists, you can’t rely on it for mainstream, out-of-the-box integration, yet.

Can you retrieve the balance sheet using the API? Yes.

Can you retrieve P&L reports using API? Yes.

Xero’s standard Accounting API provides endpoints for core reports:

  • GET /Reports/ProfitAndLoss
  • GET /Reports/BalanceSheet
  • GET /Reports/TrialBalance

But it does not include:

  • CashFlowStatement
  • StatementOfCashFlows

You are left with nothing when it comes to cash flow, one of the most critical reports in financial modeling.

In summary, Xero’s default Accounting API lacks a native feature that calculates cash flow in real-time from a single API call.

Workaround: Reverse-Engineered Cash Flow Using Two Balance Sheet Snapshots

We have successfully applied the following method in multiple clients’ systems. It has proven to be effective for them.

It will work for you too!!

Fundamentally, a Cash Flow statement represents the change in cash between two date ranges, categorized into three primary categories.

  • Operating Activities
  • Investing Activities
  • Financing Activities

Reconstructing the cash flow statement from two balance sheet reports, similar to what accountants do manually but completely automated via API, is one method we use to assist clients in overcoming Xero’s absence of a native cash flow API.

This method is based on the indirect method of cash flow reporting, which is accepted globally under both GAAP and IFRS.

Cash Flow = Net change in cash between two points in time

And that change is a result of movements in non-cash accounts (inventory, receivables, liabilities, equity, etc.)

Therefore, we can determine where the cash originated from and where it went by examining the balance sheets at two different dates and monitoring how each category changed.

This is how accountants manually build cash flow statements. We’re simply replicating this logic via API and data transformation.

Step-by-Step Process

1. Pull Balance Sheets via API

Use the standard Xero endpoint:

GET /Reports/BalanceSheet?date=2024-01-01

GET /Reports/BalanceSheet?date=2024-03-31

This gives us:

  • Assets
  • Liabilities
  • Equity
  • Bank (Cash equivalents)

All categorized by account types.

2. Parse Account Groups

Group accounts into categories:

  • Current Assets (e.g., inventory, receivables)
  • Non-Current Assets (e.g., fixed assets, investments)
  • Current Liabilities (e.g., payables, short-term loans)
  • Equity (e.g., retained earnings, capital contributions)
Account CategoryCash Flow Section
Inventory, AR, APOperating Activities
Fixed AssetsInvesting Activities
Loans, EquityFinancing Activities

3. Calculate (Change) for Each Account

Compare balances from both dates:

change = balance_at_end - balance_at_start

Example:

  • Inventory increased from $10,000 → $15,000 = +$5,000 → This is a cash outflow (you spent cash to hold more inventory)
  • Accounts Payable increased = cash inflow (delayed payment)
  • Fixed Assets decreased = cash inflow (likely from asset disposal)
  • Cash itself will show the net movement

4. Build the Cash Flow Statement

{
  "Operating Activities": {
    "Change in Inventory": -5000,
    "Change in Receivables": -3000,
    "Change in Payables": +4000,
    "Net Operating Cash": -4000
  },
  "Investing Activities": {
    "Asset Purchases": -10000,
    "Asset Sales": +2500,
    "Net Investing Cash": -7500
  },
  "Financing Activities": {
    "Loan Proceeds": +10000,
    "Equity Injection": +2000,
    "Net Financing Cash": +12000
  },
  "Net Change in Cash": +500
}

5. Validation Check

Closing Cash (from BS) Opening Cash = Net Change in Cash (from calculation)

If this aligns, your cash flow report is mathematically sound. And yes, it’s accurate.

Considerations

  • Building mapping logic for the accounts is necessary.
  • Timing cutoffs, journals, and reevaluations may impact accuracy.
  • It works best for internal analytics and forecasts, not audited reports.

So, What Should You Do?

ScenarioRecommendation
You need basic cash flow in a dashboard or analytics toolUse the 2 Balance Sheet delta method
You’re building a SaaS tool and need clean, accurate cash flow categorizationApply for Finance API access
You want fast insights but not complete audit level reportingConsider hybrid: Balance Sheet logic + summary overrides
You’re working with U.S. based clientsBe cautious Finance API access may be geographically restricted

Final Thought

Although cash flow insight is essential, there is a flaw in Xero’s main API stack.

You’ll need to work around the restriction, whether you’re creating a CFO dashboard, automating investor reporting, or integrating with another financial tool.

We’ve built reliable, scalable modules that:

  • Reconstruct Cash Flow statements using Xero balance deltas
  • Integrate Finance API for approved clients
  • Normalize cash movement data across Xero, QuickBooks, and custom ERPs

And we can help you too!!

Let’s build beautiful financial analytical tools and AI-powered insights together.

Article by

Chintan Prajapati

Chintan Prajapati, a seasoned computer engineer with over 20 years in the software industry, is the Founder and CEO of Satva Solutions. His expertise lies in Accounting & ERP Integrations, RPA, and developing technology solutions around leading ERP and accounting software, focusing on using Responsible AI and ML in fintech solutions. Chintan holds a BE in Computer Engineering and is a Microsoft Certified Professional, Microsoft Certified Technology Specialist, Certified Azure Solution Developer, Certified Intuit Developer, Certified QuickBooks ProAdvisor and Xero Developer.Throughout his career, Chintan has significantly impacted the accounting industry by consulting and delivering integrations and automation solutions that have saved thousands of man-hours. He aims to provide readers with insightful, practical advice on leveraging technology for business efficiency.Outside of his professional work, Chintan enjoys trekking and bird-watching. Guided by the philosophy, "Deliver the highest value to clients". Chintan continues to drive innovation and excellence in digital transformation strategies from his base in Ahmedabad, India.