ml-connector
XeroRamp

Xero and Ramp integration

Xero runs your accounting. Ramp runs your spend. Connecting the two keeps your payables ledger updated as your team incurs expenses and processes bills. Bills and expense reimbursements from Ramp flow into Xero without manual re-keying, allocated to the right GL accounts and vendors. Vendors created in Ramp can be matched against Xero contacts so procurement data stays in sync across both systems. ml-connector handles the different APIs on each side and moves the records on a schedule you control.

How Xero works

Xero is a cloud accounting platform providing REST API access to invoices, bills, contacts, purchase orders, payments, accounts, and other transactional records. The Accounting API uses OAuth2 Authorization Code flow with 30-minute access tokens and 60-day refresh tokens. Xero requires the Xero-tenant-id header on every request to target a specific organization. The platform enforces rate limits of 5 concurrent calls and 60 per minute per tenant. Data can be retrieved via page-based pagination with 100 records per page, and delta sync is possible using the If-Modified-Since header. Xero publishes webhooks for Contact, Invoice, CreditNote, Payment, ManualJournal, PurchaseOrder, and BankTransaction events, though webhook payloads contain only metadata and require a follow-up GET request to fetch the full record.

How Ramp works

Ramp is a spend management platform providing a REST Developer API for bills, vendors, purchase orders, transactions, GL accounts, and users. Authentication uses OAuth2 Client Credentials flow recommended for ERP connectors, with access tokens valid for 10 days, or Authorization Code flow with 1-hour tokens. Ramp publishes webhooks for real-time notifications across Bills (created, updated, paid, archived, rejected), Transactions (cleared, synced, declined), Vendors, Users, Reimbursements, and other spend events, verified via HMAC-SHA256 signature. Vendors cannot be directly created but are established implicitly when bills are submitted. GL Accounts and custom field writes require both accounting:read and accounting:write scopes. Purchase Orders are read-only and can only be patched for memo and line items.

What moves between them

The main flow runs from Ramp into Xero. Bills and expenses created or updated in Ramp trigger webhooks that ml-connector receives, and those records are then written into Xero as purchase invoices or accruals allocated to the matching GL accounts. Vendor records from Ramp flow into Xero contacts so procurement contact details stay aligned. GL account mappings are validated in both directions so every bill lands on a valid account in your Xero chart. Because bills in Xero are immutable once reconciled, ml-connector tracks the Xero record state and handles updates carefully. The sync runs in near real-time via Ramp webhooks, with full retry and audit trail on every record.

How ml-connector handles it

ml-connector accepts OAuth2 credentials for both systems and manages token refresh automatically. On the Ramp side, it uses Client Credentials flow with 10-day token life, validating webhook signatures via HMAC-SHA256 to ensure bill and expense events are genuine. When a bill or expense arrives from Ramp, ml-connector looks up the vendor in Xero by name and GL account code to find the matching contact, then creates or updates the bill in Xero's payables stream. Because Xero requires the Xero-tenant-id header per organization, ml-connector stores and routes that header per customer. Ramp requires both accounting:read and accounting:write scopes to handle GL account writes, so ml-connector requests those during setup. Bills in Xero are page-based paginated with 100 records per page, so reconciliation scans forward in time by modification date using the If-Modified-Since header to avoid re-processing. Every record carries a full audit trail, and if a downstream Xero write fails, the bill is queued for replay.

A real-world example

A mid-sized technology consulting firm uses Xero for accounting and Ramp for corporate cards and bill pay across four offices. Before the integration, the finance team exported bills from Ramp twice a week and manually entered them into Xero, mapping each bill to the correct vendor and cost center. This process took four hours per week and introduced errors when team members forgot to code bills to the right GL accounts. With Xero and Ramp connected, every bill approved in Ramp flows into Xero automatically within minutes, coded to the GL account specified in Ramp. Vendors are matched by name, reducing rework, and the finance team focuses on review and reconciliation rather than data entry. Month-end close runs faster because the bill ledger is already current.

What you can do

  • Write Ramp bills into Xero purchase invoices, allocated to the correct GL account and vendor.
  • Match Ramp vendors against Xero contacts by name and maintain alignment as vendor records change.
  • Receive Ramp bill and expense events via webhooks and process them in near real-time with retries.
  • Authenticate Ramp with OAuth2 Client Credentials and Xero with Authorization Code flow, managing token refresh automatically.
  • Track the state of every bill and handle updates correctly, with a full audit trail on each record.

Questions

Which direction does data move between Xero and Ramp?
The main flow is from Ramp into Xero. Bills and expenses created in Ramp flow into Xero as purchase invoices, and vendor records from Ramp are matched against Xero contacts. GL accounts and cost center codes are aligned in both directions so bills land on valid accounts. Because bills in Xero are immutable once reconciled, ml-connector does not push updates back to Ramp.
How does ml-connector map bills to the correct vendor and GL account in Xero?
When a bill arrives from Ramp, ml-connector looks up the vendor name in Xero to find the matching contact, then uses the GL account code specified in the bill to route it to the correct account in Xero's chart. Vendors cannot be created directly in Ramp, so they are matched by name. If a vendor does not exist in Xero, the bill is flagged for manual review.
What happens if a bill update in Ramp comes after the bill has been reconciled in Xero?
ml-connector tracks the state of each bill and handles updates carefully. If a bill has already been reconciled or locked in Xero, ml-connector routes the update to a separate feed for review rather than attempting to modify the locked record. The audit trail captures all state transitions and allows replay if a downstream Xero update fails.

Related integrations

Connect Xero and Ramp

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

Get started