ml-connector
PlexBrex

Plex and Brex integration

Plex runs manufacturing, production, and finance for discrete manufacturers. Brex handles corporate spending, cards, and expense management. Connecting the two keeps your supply chain visibility aligned with your spend records. Expenses logged in Brex flow into Plex as GL documents, mapped to supplier accounts and purchase ledger codes, and supplier records from Plex validate Brex vendor entries. The integration eliminates manual re-entry of expenses and closes the gap between spend management and production finance.

How Plex works

Plex is a cloud-native ERP platform with full financials, purchasing, inventory, and MES capabilities for discrete manufacturing. It exposes suppliers, purchase orders, invoices, GL accounts, customers, and sales orders through REST JSON APIs at https://cloud.plex.com/api, authenticated with OAuth 2.0 client credentials. Legacy SOAP XML Web Services are also available for configured datasources. Plex does not offer native webhooks, so expense records and GL accounts are read by polling on a configurable interval, typically 5-15 minutes, filtered by modified_date or created_date. Role-based permissions are enforced, and the integration user must have the correct Plex role assigned or API calls return 403.

How Brex works

Brex is a corporate spend management platform providing corporate cards, expenses, transfers, and accounting records through REST APIs at https://api.brex.com, authenticated with a bearer token (static API key for single-tenant, OAuth 2.0 for multi-tenant). Brex offers real-time webhook notifications via Svix for expense payments, accounting record generation, and transfer events, including a new ACCOUNTING_RECORD_READY_FOR_EXPORT event added in November 2025. Transactions and accounting records are read-only, but expenses and vendors can be written to update spend records. All POST operations require an Idempotency-Key header to ensure duplicates are rejected.

What moves between them

The main flow is Brex into Plex. When expenses are recorded in Brex, the integration receives the accounting record ready event via Brex webhooks and posts the expense amount into Plex as a GL document, mapped to the matching GL account and supplier on the Plex side. Supplier records from Plex are synced into Brex via polling to populate the vendor reference table, so expense entries in Brex can be validated against known suppliers. Transfers and card transactions from Brex also flow into Plex for cash and working capital accounting, with all records carrying a full audit trail for reconciliation.

How ml-connector handles it

ml-connector subscribes to Brex webhooks using Svix and verifies each webhook signature with the registered HMAC-SHA256 secret, rejecting any unsigned or tampered events. On the Plex side, it authenticates with OAuth 2.0 client credentials and polls GL accounts and suppliers on a schedule you control. When a Brex ACCOUNTING_RECORD_READY_FOR_EXPORT event arrives, ml-connector fetches the accounting record details and the corresponding transaction or expense, then looks up the matching GL account and supplier in Plex. It builds the GL document with the correct account code, supplier reference, and amount, then posts it into Plex. Plex enforces role-based access control, so the integration user must have GL posting permissions. Brex requires an Idempotency-Key on every POST, which ml-connector generates from the webhook event ID to prevent duplicate postings if the webhook is retried. Plex has no documented rate limit, but ml-connector implements exponential backoff on HTTP 429 responses. If a Plex post fails, the webhook is replayed, and the full event history is audited for replay and reconciliation.

A real-world example

A mid-sized discrete manufacturer uses Plex for production, materials, and GL accounting, and issues corporate Brex cards to the procurement and operations teams for supplier payments and operational expenses. Before the integration, the finance team reviewed Brex expense reports weekly and manually re-entered each transaction into Plex's GL, sometimes weeks later. This created reconciliation delays and opportunities for entry errors. Supplier payments made via Brex card were invisible to Plex until the monthly credit card statement was imported, leaving accounts payable incomplete. With Plex and Brex connected, Brex expenses post automatically to Plex's GL the same day, mapped to the correct cost center and supplier, and supplier records in Brex always reflect the current Plex master. Month-end close is faster because the GL is already reconciled and supplier accounts show card activity in real time.

What you can do

  • Post Brex expenses and accounting records into Plex as GL documents mapped to purchase ledger accounts and supplier references.
  • Sync Plex suppliers into Brex to validate vendor entries and keep vendor master data aligned across both systems.
  • Verify Brex webhook signatures via HMAC-SHA256 and handle retries and event deduplication using Idempotency-Key.
  • Poll Plex GL accounts and suppliers on a configurable schedule using OAuth 2.0 credentials while respecting role-based access control.
  • Track the full audit trail of every transaction, including webhook receipt, Plex posting, and replay history for reconciliation.

Questions

Which direction does data move between Plex and Brex?
The primary flow is Brex into Plex. Expenses, accounting records, and transfers from Brex post into Plex as GL documents. Supplier records from Plex are synced into Brex via polling to populate and validate the vendor master. This two-way alignment keeps spend visibility and supplier records current in both systems.
Does the integration handle Plex's lack of webhooks and polling constraints?
Yes. ml-connector polls Plex GL accounts and suppliers on a configurable interval, typically aligned with your accounting cycle. Brex webhooks push accounting record events in real time, allowing immediate GL posting in Plex. If a webhook is delayed or missed, ml-connector retrieves the full event history during the next scheduled poll to ensure no transactions fall through.
How does the integration handle Brex Idempotency-Key requirements and Plex role-based access?
ml-connector generates Idempotency-Key headers from Brex webhook event IDs on every POST to Brex, preventing duplicate transactions if webhooks are retried. On the Plex side, the integration user must have GL posting and supplier write permissions; if access is denied, ml-connector surfaces the permission error in the audit log so the access can be corrected before a retry.

Related integrations

Connect Plex and Brex

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

Get started