Bank Feed Basiq AU/NZ
Pulls live posted transactions from Australian and New Zealand banks into Odoo 19 statement lines via the Basiq open banking gateway, idempotent on bank reference.
Why this module
Bank Feed Basiq AU/NZ
Replaces the stub, not a stub itself
The module registers a fully working BasiqLiveConnector that overrides the placeholder. It authenticates, paginates transactions, and maps them into statement lines ready for reconciliation.
Re-fetch the same date range without duplicating lines
Transactions are keyed on bank-side reference ID in the parent framework. Running fetch again on the same account and date range skips lines already imported, and the since-date watermark advances to the latest posted date automatically.
Bring your own Basiq account and API key
Credentials are stored in Odoo as a JSON object and sent only to Basiq. No IAP, no cloud sync, no licensing tie-in; the module is pure integration plumbing.
Day in the life
Accountant sets up a Basiq feed and it runs automatically
Alice creates a live connector profile, selects 'Basiq', enters her Basiq API key, user ID, and account ID, and binds it to a bank journal. The scheduled fetch runs every 2 hours. On the next cycle, the connector authenticates with Basiq, pulls all transactions posted since the last run, and writes them as bank statement lines. When she imports her official bank CSV that same day, the fuzzy duplicate detection catches any overlap and flags it. She reconciles both sources and moves on. Next day, another run fetches only the new posted transactions since the watermark.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
Basiq returns results in pages of up to 500 transactions. The connector handles pagination via the 'links.next' field in the response, with a safeguard cap at 50 pages per run to prevent runaway fetches.
Transaction dates come from Basiq as ISO 8601 strings (e.g., '2026-06-01T00:00:00Z'). The connector extracts the date portion, falls back to 'transactionDate' if 'postDate' is missing, and returns None if the date cannot be parsed, skipping the invalid row.
Basiq amounts are signed: negative indicates money out, positive indicates in. The connector preserves this sign and maps it directly into the framework's BankTransaction amount field, so debit and credit are correct from the start.
If the profile lacks any of 'api_key', 'user_id', or 'account_id' in its credentials JSON, the connector raises a ConnectorError naming the missing field. The framework catches this and logs it to the run history without crashing other profiles.
If the Basiq token endpoint does not return an 'access_token' in the response, the connector raises an error. This typically means the API key is invalid or the Basiq account is locked.
What is inside
Built to do the job, end to end.
- connectors/basiq_live.py. The main connector class. Implements the LiveBankConnector interface: authenticate() exchanges the API key for a Basiq bearer token via Basic auth, and fetch_transactions() pages the account's transactions with filters on account ID and posted date. Maps each row using _map_transaction() to extract reference, posted date, signed amount, currency, and description into BankTransaction records.
- connectors/__init__.py. Imports basiq_live at module load time, triggering the @register_connector decorator that adds BasiqLiveConnector to the framework's named connector registry under the 'basiq' key, replacing any stub.
- tests/test_basiq_live.py. Unit tests with mocked HTTP covering connector registration (overrides stub), token exchange and transaction fetch flow, amount sign mapping (negative out, positive in), ISO 8601 date parsing with fallback, missing-credential validation, and end-to-end profile run that materialises statement lines and deduplicates on re-run.
- Module integration. Registers under 'basiq' in the parent Bank Statement Import framework. Depends on eh_account_bank_statement_import, which provides the LiveBankConnector base class, framework profile model, scheduled 2-hourly cron, and idempotent line deduplication by (journal, bank_reference).
Honest about the edges
What this does not do, so nothing surprises you.
- This module is a plugin to Bank Statement Import; it does not work standalone. The parent module must be installed first.
- Basiq credentials (API key, user ID, account ID) must be created and maintained outside Odoo in the customer's own Basiq account. The module has no UI for provisioning or rotating keys; it only consumes them from the profile's JSON credentials field.
- The connector supports only the Basiq API v3.0 (au-api.basiq.io). It does not support other Basiq endpoints, other versions, or other open banking aggregators; those require separate connector modules.
- Scheduling is handled by the parent framework's 2-hourly cron job. This module registers a connector; it does not create or manage the cron itself.
- Currency detection: if the profile does not specify a currency_code, the connector defaults to AUD. Multi-currency accounts are supported via per-transaction currency fields from Basiq.
- No filtering or transformation of transactions is performed. All posted transactions for the account and date range are imported as-is; filtering rules (e.g., by amount or description) must be applied downstream in reconciliation.
Basiq integration Odoo 19, live bank feed Australia, open banking CDR Odoo, automated bank statement import, Basiq connector, CBA NAB ANZ Westpac feed, Odoo bank reconciliation, ASB BNZ New Zealand, real-time transaction sync, idempotent bank import, bring your own API key, live bank statement lines, Australian open banking, bank feed framework Odoo 19
Please log in to comment on this module