ml-connector
OdooBrex

Odoo and Brex integration

Odoo runs your accounting, purchasing, and HR. Brex manages corporate cards, expenses, and bill pay. Connecting the two keeps your spend data out of spreadsheets and into your books. Card transactions and approved expenses from Brex post as journal entries into Odoo's general ledger, allocated to the cost centers and accounts you define, and the audit trail stays intact. ml-connector handles the different auth schemes on each side and moves the data on a schedule you control.

How Odoo works

Odoo is an open-source ERP suite available as Odoo Online (SaaS at https://<subdomain>.odoo.com), Odoo.sh (PaaS), or self-hosted. It exposes accounting records, transactions, expenses, vendors, employees, and products through XML-RPC over HTTP POST to {base_url}/xmlrpc/2/object and JSON-2 over HTTP POST to {base_url}/json/2/<model>/<method>. Authentication uses an API key paired with a username, obtained through an initial login call that returns a uid. Polling is the production-recommended approach, using write_date filters on search_read calls to find new and changed records. Odoo's Automated Actions can send webhooks if Enterprise + Studio is enabled, but outgoing webhooks are not production-grade and lack HMAC signature verification. Custom API access requires the Custom pricing plan; Standard and One App Free plans cannot use external APIs.

How Brex works

Brex is a corporate spend management platform accessed through a REST API at https://api.brex.com. It exposes corporate card transactions, cash transactions, expenses, vendors, transfers, accounting records, users, and budgets through JSON REST endpoints. Authentication uses a bearer token: either a static API key (bxt_<random>) for single-tenant use with a 90-day inactivity expiry, or OAuth 2.0 Authorization Code flow for multi-tenant apps with 1-hour access token lifetime. Brex publishes events via Svix webhooks with HMAC-SHA256 signature verification, including TRANSFER_PROCESSED, TRANSFER_FAILED, EXPENSE_PAYMENT_UPDATED, USER_UPDATED, and ACCOUNTING_RECORD_READY_FOR_EXPORT (Alpha as of March 2026). Transactions are read-only; write operations are available on expenses, vendors, transfers, users, cards, and budgets. POST transfers require an Idempotency-Key header to prevent duplicate payments.

What moves between them

The main flow runs from Brex into Odoo. Card transactions and cash transactions from Brex are mapped to Odoo account.move (journal entries) allocated to the configured cost center or project. Approved expenses from Brex are posted as account.move records with line items referencing the expense category and vendor. Vendor records are synchronized in both directions so Brex vendor references match Odoo partners. The integration can also receive accounting records from Brex once the ACCOUNTING_RECORD_READY_FOR_EXPORT event is enabled, which eliminates manual export from Brex and entry into Odoo. Because Odoo polling is the recommended production sync mechanism, ml-connector can poll Brex for transactions and expenses on a schedule, or listen for Brex webhook events via Svix for near-real-time posting.

How ml-connector handles it

ml-connector stores both credential sets encrypted: the Odoo API key and the Brex bearer token (or OAuth refresh token for multi-tenant setups). For Odoo, it authenticates with the supplied username and API key, respecting the integration user's Odoo access rights and record rules so that cross-company transactions are visible only if the user can see them. For Brex, it validates webhook signatures using the HMAC-SHA256 secret from Svix, and includes an Idempotency-Key on every POST to transfers to ensure Brex does not process the same payment twice if a retry occurs. Brex webhooks carry event timestamps and idempotency information, so ml-connector can deduplicate on receipt. On the Odoo side, transactions and expenses are mapped to account.move records with the correct account.move.line entries for each transaction detail or expense line item. Cost centers, projects, and analytical accounts are preserved through the mapping. Brex's 90-day API key expiry for single-tenant integrations is tracked so that a renewal does not turn into an outage. Multi-tenant OAuth setups use refresh tokens to maintain access without manual re-authentication. Every record carries a full audit trail with source identifiers so reconciliation between Brex and Odoo is straightforward.

A real-world example

A mid-sized services company with a head office and three satellite offices uses Odoo for accounting and procurement, and issues corporate Brex cards to project managers for travel and equipment purchases. Before the integration, each office manager collected Brex card statements weekly and hand-entered transaction details into Odoo, categorizing them against projects and cost centers. Month-end close required chasing receipts and reconciling Brex against Odoo, which took two days and often surfaced mismatches. With Odoo and Brex connected, card transactions and expenses post automatically to the correct project and cost center in Odoo's general ledger as they are approved in Brex. Reconciliation is automatic, and the finance team can close the books on time without manual re-keying.

What you can do

  • Post Brex corporate card transactions and cash transactions as journal entries in Odoo, allocated to the project and cost center defined in the mapping.
  • Sync approved Brex expenses as bills into Odoo with line items that reference the correct accounts and vendors.
  • Validate that vendors in Brex match partners in Odoo, and add new vendors to Odoo when they are created in Brex.
  • Verify Brex webhook signatures via HMAC-SHA256 and include Idempotency-Key headers on transfers to prevent duplicate payments.
  • Handle Odoo API key authentication and record-level access rights, with retries and a full audit trail on every transaction.

Questions

Which direction does data move between Odoo and Brex?
The main flow is Brex into Odoo. Card transactions, cash transactions, and approved expenses move from Brex into Odoo as journal entries and bills, allocated to the cost center and account you define in the mapping. Vendor records are aligned in both directions so that Brex vendor references match Odoo partners. Odoo general ledger entries are not sent back to Brex because Brex is a source of spend data, not a target for accounting entries.
How does the integration handle Odoo API key authentication and Brex webhook security?
ml-connector authenticates to Odoo with the API key you provide, paired with a username, and respects your integration user's Odoo access rights and record rules. For Brex, it validates every incoming webhook using HMAC-SHA256 signature verification with the Svix webhook secret, so that only authentic events from Brex are processed. On outgoing transfers, ml-connector includes an Idempotency-Key header so that Brex does not process the same payment twice if a request is retried.
Does the integration work with both Odoo Online and self-hosted Odoo?
Yes. ml-connector accepts the full Odoo instance URL, whether Odoo Online (https://<subdomain>.odoo.com), Odoo.sh (https://<subdomain>.odoo.sh), or a self-hosted domain. Authentication with API key works the same way across all editions, as long as your subscription includes the Custom pricing plan for external API access. Polling is the production-recommended approach, so ml-connector can sync transactions and expenses on a schedule tied to your monthly close cycle.

Related integrations

Connect Odoo and Brex

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started