ml-connector
IFS CloudBrex

IFS Cloud and Brex integration

IFS Cloud runs your enterprise finance and procurement. Brex runs your corporate cards and expense management. Connecting the two keeps your general ledger aligned with your company spending. Brex expense approvals and accounting records flow into IFS Cloud as posting proposals, mapped to the correct GL accounts and company codes. ml-connector bridges the two OAuth 2.0 implementations and manages the concurrency controls each system requires.

How IFS Cloud works

IFS Cloud exposes finance, procurement, and asset data through OData v4 REST. The API sits on a tenant-specific subdomain with a base URL of https://<tenant>.ifs.cloud, and every request requires an OAuth 2.0 bearer token obtained via the client credentials grant. Key entities include supplier invoices, purchase orders, GL accounts, journal vouchers, and accounting dimensions. IFS Cloud has no standard webhook subscription API; instead it offers server-side Event Actions that POST to external URLs on business events, but these require manual per-customer configuration and are not self-registerable. The recommended pattern is poll-based access to the OData API using modified timestamps and state filters. IFS Cloud enforces optimistic concurrency via ETag headers on mutations, requires the If-Match header carrying the ETag value, and maintains a 1000-request-per-minute rate limit.

How Brex works

Brex exposes spend management data through REST APIs at https://api.brex.com, secured with OAuth 2.0 bearer tokens that last 1 hour. Key entities include transactions, expenses, vendors, transfers, accounting records, and user management. Brex provides webhook event types including ACCOUNTING_RECORD_READY_FOR_EXPORT (added Nov 2025, expanded Mar 2026), TRANSFER_PROCESSED, and EXPENSE_PAYMENT_UPDATED, with HMAC-SHA256 signature verification. Transactions are read-only; mutations are available for expenses, vendors, transfers, users, cards, and budgets. Brex requires an Idempotency-Key header on POST transfers for dedup, enforces a 90-day inactivity expiry on user tokens, and limits the expenses endpoint to 100 records per page.

What moves between them

Brex accounting records and approved expenses flow into IFS Cloud as posting proposal headers. The primary trigger is the ACCOUNTING_RECORD_READY_FOR_EXPORT webhook event from Brex, supplemented by polling when webhooks are not enabled. Direction is Brex-to-IFS, keeping IFS Cloud's general ledger synchronized with approved spend. Reference data such as GL accounts and company codes are pre-aligned so each Brex transaction maps to a valid IFS posting proposal without re-keying.

How ml-connector handles it

ml-connector stores encrypted OAuth 2.0 credentials for both systems. On the Brex side it receives ACCOUNTING_RECORD_READY_FOR_EXPORT webhook events, verifies the HMAC-SHA256 signature, and retrieves the accounting record detail via Brex REST. For IFS Cloud it refreshes the OAuth 2.0 bearer token before each call (tokens expire in 60 minutes), then reads the ETag from the target GL account or voucher record before posting a new proposal. Every POST mutation to IFS includes the captured ETag in the If-Match header to satisfy optimistic concurrency. If an ETag is stale (IFS returns 412 Conflict), ml-connector re-reads the record, captures the new ETag, and retries the mutation. It also handles IFS OData page-size limits (keeping expanded arrays under 5000 elements) and respects the 1000-request-per-minute rate limit with exponential backoff on HTTP 429. Brex vendor and expense records are deduplicated by querying existing IFS posting proposals before creating new ones.

A real-world example

A mid-market technology company uses IFS Cloud for finance and procurement, and uses Brex for employee corporate cards and expense management. Each week, the finance team reviews approved expenses in Brex, exports them to a spreadsheet, and manually re-enters the amounts into IFS Cloud's general ledger by department. With IFS Cloud and Brex connected, each approved accounting record from Brex flows automatically into IFS Cloud as a posting proposal, mapped to the company code and GL accounts for each department, so the manual entry step is eliminated and month-end close reconciliation is complete before the process begins.

What you can do

  • Receive Brex accounting records and expense data via webhook, with HMAC-SHA256 signature verification.
  • Map Brex transactions to IFS Cloud GL accounts and company codes for automatic posting proposal creation.
  • Handle OAuth 2.0 token refresh on the IFS Cloud side (60-minute expiry) and bearer token auth on the Brex side (1-hour expiry).
  • Manage IFS Cloud optimistic concurrency by reading and applying ETag headers on every mutation, with automatic retry on stale ETags.
  • Poll Brex and IFS Cloud on a configurable schedule when webhooks are not enabled, with dedup to prevent duplicate posting proposals.

Questions

What data moves from Brex into IFS Cloud?
Brex accounting records and approved expenses flow into IFS Cloud as posting proposal headers. Direction is Brex-to-IFS only. Transactions in Brex are read-only, so ml-connector never writes financial data back into Brex. Reference data such as vendors is aligned so posting proposals map to valid GL accounts and company codes.
How does ml-connector handle IFS Cloud's ETag concurrency requirement?
IFS Cloud enforces optimistic concurrency via ETag headers. Before posting a new proposal, ml-connector reads the target GL account or voucher record to capture its current ETag, then includes that ETag in the If-Match header on the mutation. If the ETag is stale (IFS returns 412 Conflict), ml-connector re-reads the record, obtains the new ETag, and retries automatically.
Does ml-connector use Brex webhooks or polling?
It uses Brex webhooks where available. ml-connector listens for ACCOUNTING_RECORD_READY_FOR_EXPORT events, verifies the HMAC-SHA256 signature, and processes the record immediately. If webhooks are not enabled, it falls back to scheduled polling of Brex and IFS Cloud on a cadence you control.

Related integrations

Connect IFS Cloud and Brex

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

Get started