Bank Connections

Fetch the user's latest transactions

Finalizes any pending connections (confirming consent), fetches the latest transactions across the user's connected accounts, matches incoming payments against unpaid invoices, turns unmatched acquirer/platform payouts (SumUp, Stripe, Apple, …) into paid invoices, and turns outgoing ones into paid expenses.

Created expenses are named and categorised automatically, in the user's language. Categories are only ever chosen from the ones the user already has — none are invented — so needCategory counts the expenses nothing fitted, the only bank work left to do by hand. The amount, date and currency always come from the bank. Ordinary unmatched customer credits are never classified by AI on this unattended path.

Retrieval uses AIS v6 JSON with explicit Swiss-calendar date bounds and follows every account and transaction page. lastSyncedAt advances only when all accounts were retrieved successfully. deferredAccounts counts accounts whose booking days are not finalized; failedAccounts counts other retrieval failures. Both retain the window for the next retry.

Alongside the counts, details carries the rows behind them — the same buckets-of-rows shape the spreadsheet importers return, so a sync summary can be opened up instead of being six numbers. Buckets: matched (credits applied to an invoice, with invoiceId), invoices_created (payout credits booked as paid invoices, with invoiceId), expenses_created (debits booked as expenses, with expenseId), unmatched_credits (credits with no invoice — these carry the machine-readable date/amount pair so a client can offer to create one, and name the suspected invoice when there was a weak match), already_imported, pending (not booked yet) and skipped_connections (with the reason nothing was fetched), skipped_accounts (failed or deferred retrieval), and reversals (reversing entries that require review of the original payment).

Each bucket is capped at 200 rows; the counts are never capped.

post/bank/fetch

Request

Response

Transactions fetched

dataunknown
successtrue required

Example response

{
  "data": {},
  "success": true
}

Changes

No recorded changes to this operation across all 5 revisions of this API.