Field notes / accounting-embedded-workflows
How to Embed a Bank Statement API in Accounting Software
Design a statement ingestion workflow with clear boundaries for extraction, review, accounting mapping, polling, and durable storage.
2026-07-22 · 10 min read · bankstatement.ai Team

TL;DR
- Treat a bank statement API as a bounded extraction stage, not a complete accounting import system.
- Keep file authorization, token custody, job tracking, review, field mapping, deduplication, reconciliation, and durable storage inside your application.
- Submit statements from a backend, persist the asynchronous job state, and route completed results to an approved JSON or spreadsheet workflow.
- Design around supported PDF, CSV, and XLSX uploads up to 25 MB, temporary result availability, and mandatory review before accounting use.
A team can add statement upload, receive clean transaction rows, and still create an unsafe accounting workflow if nobody owns review, field mapping, duplicate detection, reconciliation, or storage. Defining those boundaries before implementation gives product and engineering teams a practical scope for the first integration: the API extracts statement data, while the accounting application controls how that data is checked, approved, imported, and retained.
Table of Contents
- Draw the responsibility boundary before choosing endpoints
- Follow one statement from intake to result retrieval
- Route extraction results into human review
- Choose JSON for software or spreadsheets for operators
- Plan polling, volume, and retention as operating constraints
- Use an integration-readiness checklist before building
- FAQ
Key Takeaways
- The extraction boundary should end when structured transactions or an export reach your controlled review layer.
- A browser or mobile client should not hold the API token. Send requests through your backend.
- An asynchronous result needs durable job state, terminal-state handling, and an explicit review route.
- JSON suits embedded workflows. CSV and XLSX suit operator review and established spreadsheet processes.
- Short-lived service results require an application-owned policy for authorized storage, deletion, and auditability.
Draw the responsibility boundary before choosing endpoints
A bank statement API for accounting software should accept an authorized statement, extract transaction data, and return a structured result or export. It should not silently become the system responsible for deciding which ledger account to use, whether a transaction already exists, or whether statement balances reconcile.

Define four owners before writing integration code:
| Owner | Responsibilities |
|---|---|
| Accounting application | File authorization, token custody, job state, access control, accounting-field mapping, deduplication, import rules, and durable storage |
| Extraction API | Accept supported files, process statements, and return structured transactions or exports |
| Human-review layer | Compare questionable output with the source, correct permitted values, approve or reject import, and record the decision |
| Downstream accounting workflow | Apply approved import rules, reconcile records, and preserve the accounting audit trail |
This boundary prevents a common category error. Extraction converts document content into usable data. Reconciliation determines whether accounting records agree. Mapping decides how extracted fields enter a particular schema. Deduplication determines whether a row has already been recorded. These are different operations with different failure consequences.
Consider an illustrative bookkeeping product that accepts monthly statements. Its backend may receive extracted dates, descriptions, and amounts, but the product must still associate the upload with the correct organization and account. It must also prevent a resubmitted statement from creating duplicate entries, map rows into its own transaction model, and require approval before posting. Those controls remain necessary even when extraction succeeds.
Follow one statement from intake to result retrieval
A single-statement integration is an asynchronous backend workflow. bankstatement.ai supports PDF, CSV, and XLSX uploads up to 25 MB, bearer authentication, multipart job submission, status polling, and retrieval of structured results or exports.

Use this minimum lifecycle:
- Authorize and inspect the upload. Confirm that the signed-in user may process the statement for the selected organization and account. Accept only supported formats and reject files above 25 MB before submission.
- Submit the statement from the backend. Keep the bearer token out of browser and mobile code. Create the conversion job with a
multipart/form-datarequest containing the statement file and the documented conversion mode. - Persist the job identifier. Successful job creation returns HTTP
202with a job identifier. Store it with the upload owner, account context, and application workflow state so processing can continue after the user leaves the page. - Poll until processing completes or fails. Poll from the backend, stop at a terminal state, and turn failures into an operator-visible status. Polling frequency, timeouts, and recovery behavior belong to the application.
- Retrieve the result and send it to review. Use the result identifier from a completed job to retrieve structured data or an available export. Store the association between the source file, job, result, and reviewer decision.
For example, a bookkeeping application can authorize a PDF upload, submit it from its backend, save the returned job identifier, poll independently of the browser session, and place the retrieved transactions in a review queue. CSV and XLSX inputs can occupy the same bounded processing stage. If the planned workflow depends on PDF OCR behavior, preflight checks, or a maximum page count, treat that capability as an implementation prerequisite and confirm it in the technical contract before accepting those documents.
Route extraction results into human review
Retrieval is not approval. Extraction and export output may be incomplete or inaccurate, so the application needs a controlled route between result retrieval and accounting import.
A practical review branch can work like this:
- The backend records the result identifier and runs application-defined validations.
- Missing expected data, an invalid amount, or another failed validation places the result on hold.
- An authorized reviewer compares the source statement with the extracted rows.
- The reviewer corrects permitted values, rejects the result, or approves it for the next stage.
- Approved rows proceed to mapping, duplicate checks, and import.
If the result contains a document-level verification indicator, use only its documented meaning to route work. Do not interpret it as field-level confidence, a transaction accuracy score, or proof that opening and closing balances reconcile. The accounting application defines the review criteria and owns the approval decision.
Review policy can also account for business risk. An application might require manual approval for a first-time account, an unfamiliar statement layout, or an import that would post directly to a ledger. Those are application rules, even when extraction finishes successfully.
Choose JSON for software or spreadsheets for operators
Choose the output according to who performs the next step. Structured JSON fits an embedded workflow in which software associates transactions with an account, displays them for review, maps approved values, and checks for duplicates. The service describes transaction rows containing date, description, and amount, but production code should use the exact schema in the current API reference.
CSV or XLSX is often a better handoff when a bookkeeper needs a portable file for an established spreadsheet process. This can reduce the interface work required for an initial release, although the application has less control after the file is downloaded.
Use this decision rule:
- Choose JSON when the application must control authorization, review state, corrections, mapping, and import.
- Choose CSV or XLSX when an operator will inspect or transfer rows through an existing spreadsheet workflow.
- Offer both only when the product identifies the authoritative output and guards against duplicate entry.
None of these formats completes reconciliation or establishes native synchronization with QuickBooks or Xero. Mapping, deduplication, import rules, and reconciliation remain separate accounting responsibilities.
Plan polling, volume, and retention as operating constraints
Asynchronous processing requires persistent application state. A practical state model might include submitted, processing, ready for review, approved, rejected, and failed. Store that state outside the browser so a user can leave and return without losing the job association.
Run polling from the backend and stop when the job completes or fails. Retry timing and handling for HTTP 402 and 429 responses should follow the current error contract. Do not make webhook delivery a design dependency unless it is explicitly part of that contract.
Start with one statement per workflow when operational simplicity matters. Batch processing may reduce submission overhead at month end, but it also introduces per-file authorization, partial failures, retry decisions, and combined review. Add it only when measured volume justifies the extra state management and the technical contract supports the required batch size and behavior.
Retention creates a firm operational deadline. Structured results and exports remain available for seven days. API-call metadata remains visible for 90 days, but it excludes uploaded files, request and response bodies, headers, and API tokens. That metadata cannot reconstruct a statement or extracted result.
Copy approved records that the application is authorized and required to retain into durable storage before the seven-day expiry. Define access, deletion, and audit rules for that storage. The extraction service is a processing stage, not a permanent statement archive.
Use an integration-readiness checklist before building
Use this checklist to decide whether the service fits the accounting workflow and to define a narrow first release:
- Inputs: Are PDF, CSV, and XLSX sufficient, and can the product enforce the 25 MB maximum?
- Document conditions: Does the technical contract support the PDF conditions, page volumes, and spreadsheet layouts your customers submit?
- Outputs: Does the next step require structured JSON, operator-facing CSV or XLSX, or both?
- Authentication: Can every API call pass through a backend that protects the bearer token?
- Polling: Can the application persist job state and poll independently of the browser session?
- Review: Is an authorized reviewer or application-defined queue responsible for checking output before reliance?
- Accounting controls: Who owns mapping, deduplication, approval, import, and reconciliation?
- Volume: Can the initial single-statement workflow handle normal and peak demand? If not, is supported batch behavior sufficient?
- Retention: Can required results be reviewed and copied to authorized storage within seven days?
- Integration boundary: Is an export or application-built import acceptable without native QuickBooks or Xero synchronization?
- Sample validation: Has the team tested representative statements it is authorized to process?
A narrow first release can support one statement at a time, one organization and account context, backend submission, persisted polling state, mandatory review, and one controlled output path. Test that handoff with representative buyer samples before expanding formats, volume, or accounting destinations.
When the checklist yields a fit, review the current technical contract for the endpoints, fields, limits, terminal states, export routes, and error responses used by the implementation. Then obtain a server-side API token and build against that confirmed contract.
FAQ
Can a bank statement API complete reconciliation?
No. Extraction can produce transaction data used in a reconciliation workflow, but the accounting application must compare records, investigate differences, apply accounting rules, and record approval. An extraction verification signal does not prove that balances reconcile.
Can a browser or mobile app call the API directly?
API requests should pass through a backend so the bearer token remains server-side. The backend can also enforce user authorization, associate jobs with the correct organization and account, and prevent one customer from retrieving another customer’s results.
What if the product requires permanent statement history?
Store required records in application-owned storage under an appropriate authorization and retention policy. Structured results and exports expire after seven days, while the 90-day API-call metadata does not contain statement files or result bodies. If the application cannot copy required records before expiry, this workflow does not meet its retention requirement.
When should batch processing be considered?
Consider batching after measuring normal and peak statement volume and confirming the current batch contract. A single-statement flow is easier to authorize, review, retry, and audit. Batch submission becomes useful when that model cannot meet throughput needs and the application can handle per-file ownership and partial failures.