Integrating with Xero

Our Xero integration allows you to sync transaction details and automatically create accounting records in Xero by assigning Xero GL (General Ledger) codes to transactions directly from your Mercury dashboard.

This integration only allows transaction information to be synced from Mercury to Xero. Any changes in Xero won’t sync back to Mercury.

Connecting to Xero from Mercury

  1. Go to Settings > Integrations and click Connect
  2. Choose whether to sync historic transaction data or start from today’s transactions
  3. Once connected, Xero will show as "Connected" on your Integrations page, where you can manage and check the status of the integration at any time

Applying Xero GL codes

Mercury customers who use Xero can categorize transactions and payments before they're reconciled in Xero. Once you connect to Xero, Mercury will automatically pull in your GL codes so you can apply them to transactions.

Whenever possible, Mercury will use AI and your categorization history to pre-fill GL codes for your transactions - these suggestions will be indicated with a sparkle icon. You can always overwrite them by clicking on the dropdown and selecting a new input. The suggestions will improve over time, the more you interact with the feature.  You can turn this feature off by navigating to Accounting > Settings and toggling Auto-categorization off.

You can also manually apply GL codes to transactions in a few different places:

  • On your Accounting page, select individual or multiple transactions and pick a GL code from the dropdown
  • On your Transactions page, click open a Transaction to view the details and select from the GL code dropdown
  • If you’re creating a new payment manually or by uploading an invoice, select from the GL code dropdown as you’re setting up the payment details
  • If you want to add a category to an upcoming payment that was already scheduled, you can view the payment details on your Payments page and select from the GL code dropdown there

Syncing transactions to Xero

Manual sync

  1. On the Accounting page, review your transactions and ensure all required fields (e.g. GL code, counterparty) are filled in
  2. Select individual or multiple transactions and click Mark as Ready
  3. Click the Sync button to push ready transactions to Xero

This syncs any additional transaction attributes (GL codes, classes, counterparty, attachments, and/or notes) you've added in Mercury to your accounting software, matching them to the original transaction record there.

Once the sync is complete, you'll see a confirmation message, or any relevant errors.

Auto-sync

By default, Mercury will automatically sync your Ready transactions to Xero on a daily schedule. If you prefer to sync transactions manually, you can turn auto-sync off on the Accounting Settings page:, 

  1. Navigate to Accounting > Settings
  2. Toggle auto-sync off

Any transaction in a Ready state at the scheduled run time will be included. If a sync fails, the affected transactions will remain in a failed state — auto-sync won't retry automatically. You can re-sync them manually from the Accounting page, and view sync history and the last successful sync timestamp in the Synced tab.

Once the sync is complete, you will see a confirmation message, or relevant errors that might come up.

Accounting record details

The type of accounting record created, the timing of the sync, and the data included will vary with each transaction type.

Transaction type Xero record Sync Data included
Scheduled bill Bill

Bill Pay page

If you select a GL code, your scheduled bill will sync first upon scheduling, and again once it's paid

  • GL code
  • Due date
  • Invoice date
  • Invoice #
  • Recipient
  • Amount
  • Internal note
  • Attachment(s)
  • Memo
Other payment (non-bill) Expense

Payments page

If GL code is select, your payment will sync upon sending. 

  • GL code
  • Send date
  • Recipient
  • Amount
  • Internal note
  • Attachment(s)
  • Memo
  • Bank description
Credit and debit card spend Expense

Accounting page

Your expense will sync upon marking as ready and clicking "Sync" on the Accounting page.

  • GL code
  • Posted date
  • Recipient/vendor
  • Amount
  • Internal note
  • Attachment(s)
  • Bank description
Other incoming payment Deposit

Accounting page

Your deposit will sync upon marking as ready and clicking "Sync" on the Accounting page. 

  • GL code
  • Posted date
  • Counterparty
  • Amount
  • Internal note
  • Attachment(s)
  • Bank description
Other outgoing payment Expense

Accounting page 

Your outgoing payment will sync upon marking as ready and clicking "Sync" on the Accounting page.

  • GL code
  • Posted date
  • Recipient
  • Amount
  • Internal note
  • Attachment(s)
  • Bank description
Internal transfer Transfer

Accounting page

A bank transfer is automatically created in your accounting software

  • Transferring accounts
  • Amount
  • Date

Frequently asked questions

Is the integration with Xero free to use?

Yes! Our Xero integration is free to use. Learn more about pricing.

What types of transactions can have GL codes applied to them?

Mercury users can categorize incoming and outgoing wires, ACH transfers, and checks. The only transaction types currently excluded are transfers and IO payments.

Why can’t I categorize transfers or IO payments?

Transfers and IO payments are categorized automatically by our system and/or Xero.

If I create a recurring payment in Mercury, will the GL code apply to all future transactions?

Yes, the GL code you assign to the first payment will be automatically assigned to all future payments in the series.

If I make changes in Xero to a transaction, will those be reflected in my Mercury account?

No, the connection is a one-way sync. Transaction information is passed from Mercury to Xero, and any changes in Xero won’t pass back to Mercury.

I lost connection to my Xero account. What should I do?

As part of a recent upgrade to the Mercury–Xero integration, accounts that did not complete the migration were disconnected on February 18. You’ll need to reconnect from your Integrations page.

What to expect after reconnecting:

  • Transaction categorization: Previously categorized transactions in Mercury will remain in Mercury only and will not sync to Xero. After you reconnect, only transactions categorized going forward will sync to Xero. If previously categorized transactions appear in your “Needs review” view, you can use the “Exclude from review” action to hide them.
  • Mercury Credit Card users:
    • Reconcile all outstanding items under “Credit” in Xero and archive that bank account, as your credit transactions will no longer feed there after the migration.
    • Your credit transactions will now feed into the “Mercury Credit” account in Xero (usually at the bottom of your account list and described as #MERC). This is the recommended approach by Xero.

Did you find this article helpful?