Skip to main content
Version: 1.0.0

Bank sync API

Read-only bank synchronisation: connections to bank data providers per site, accounts with their balance snapshot and booked transactions. No payment is ever initiated.

Providers: wise (Wise Platform API with a read-only API token), enablebanking (PSD2 aggregator covering LCL, consent redirect flow) and mock (deterministic fake data). Enabled providers come from BANK_PROVIDERS.

Connection flow: token providers (wise, mock without institution) are active at once. Redirect providers (enablebanking, mock with an institution) answer pending with an auth_url; the bank sends the browser back to BANK_REDIRECT_URL?code=…&state=…. The state is <connection id>.<random>: the web callback page reads the connection ID from it and calls GET /v1/bank/connections/{id}/callback with the code and state (checked against a hash, valid BANK_CONSENT_STATE_TTL). Credentials (API tokens, provider sessions) are encrypted with the keyring (subject = connection ID) and crypto-shredded when the connection is deleted.

Synchronisation: every BANK_SYNC_INTERVAL (and on demand) the service refreshes accounts and balances and imports booked transactions from the last synced date minus BANK_SYNC_OVERLAP (BANK_SYNC_LOOKBACK on the first run), deduplicated on the provider transaction ID per account. A rejected consent moves the connection to expired, rejected credentials to error.

Authorization (finance.account.read / finance.account.manage, both sensitive: step-up required): accounts are checked on atl:finance:<site>:account/<id> (site parent); connections at site level on atl:settings:<site>:site/<site>. Lists are filtered with the Lookup scope of finance.account.read; unreadable resources answer 404. Every read is audited.

Events: bank.transaction.v1 (bank.transaction.imported with transaction_id, account_id, site_id, amount_cents, currency, booking_date, counterparty, remittance) and bank.connection.v1 (created, authorized, consent_expiring once BANK_CONSENT_NOTICE before the consent end, consent_expired, deleted; IDs, provider, status and expiry only).

Authentication​

Security Scheme Type:

apiKey

Cookie parameter name:

atl_session