ml-connector
XeroAmazon Seller Central

Xero and Amazon Seller Central integration

Xero runs your accounting, ledger, and invoicing. Amazon Seller Central runs your marketplace storefront, orders, and payouts through the Selling Partner API. Connecting the two keeps marketplace sales and Amazon settlements in the Xero ledger without re-keying. Amazon orders become Xero sales invoices, Amazon settlement events post as fee and payout journals, and Xero item prices flow back out to Amazon listings. ml-connector handles the very different APIs on each side and moves data on a schedule you control.

How Xero works

Xero exposes contacts, invoices, payments, chart of accounts, items, tracking categories, and manual journals through its REST Accounting API at api.xero.com. Authentication is OAuth 2.0 authorization code flow: a 30 minute access token plus a 60 day refresh token, and every call carries the Xero-tenant-id header to target one organization. The same /Invoices endpoint serves sales invoices as Type ACCREC and bills as Type ACCPAY. Xero offers push webhooks for a subset of resources, but they carry metadata only and do not cover accounts or items, so finance sync reads with page-based paging and an If-Modified-Since delta header.

How Amazon Seller Central works

Amazon Seller Central exposes data through the Selling Partner API, a REST surface over regional base URLs where the marketplace ID is required on most calls. Authentication is OAuth 2.0 via Login with Amazon: the seller authorizes once, yielding a long-lived refresh token the connector exchanges for one-hour access tokens. Orders and financial events are read through the Orders and Finances APIs with NextToken cursor paging, and authoritative payout data comes from the Reports API settlement report, generated asynchronously. SP-API does not deliver plain HTTP webhooks; push events arrive only through AWS EventBridge or SQS, so a pure connector reads on a schedule.

What moves between them

The primary flow runs from Amazon Seller Central into Xero. ml-connector reads Amazon orders and creates Xero invoices of Type ACCREC against the right contact, and reads settlement financial events so Amazon fees, refunds, and net payouts post as manual journals on the correct chart of accounts codes. Listing and pricing data flows the other direction: Xero item sales prices are pushed to the matching Amazon listings so the storefront reflects accounting prices. Reference data such as SKU to Xero item code and marketplace to account code is aligned so every line lands on a valid account, with tracking categories applied where a marketplace split is wanted. Cadence follows your settlement and reporting calendar rather than a real-time push.

How ml-connector handles it

ml-connector stores both credential sets encrypted and runs two auth bridges at once: it exchanges the Amazon refresh token for a fresh access token before each batch and caches it for its one-hour life, and it holds a Xero OAuth session, refreshing the 30 minute access token from the 60 day refresh token and sending the Xero-tenant-id header on every call. On the Amazon side it follows NextToken until the cursor is absent and passes the marketplace ID on every request; on the Xero side it pages by incrementing page until a partial page and filters incremental reads with If-Modified-Since against UpdatedDateUTC. Because Amazon financial settlement is asynchronous, it treats the Reports API settlement report as the authoritative payout source and reconciles event-level Finances data against it. SKU to item code and marketplace to account code maps are applied first so journals and invoices reference accounts that already exist. Xero has no idempotency header, so the connector supplies the InvoiceID GUID on create to upsert and avoid duplicate invoices on retry, and it respects the per-tenant 60 calls per minute and 5,000 calls per day limits, backing off on HTTP 429 using the Retry-After header.

A real-world example

A growing consumer-goods seller, roughly thirty staff, runs Xero for its books and sells across Amazon US and UK through Seller Central. Before the integration, a bookkeeper downloaded Amazon settlement reports every two weeks and hand-keyed gross sales, FBA fees, refunds, and the net payout into Xero, then spent days at month-end reconciling Amazon deposits against the bank feed. With Xero and Amazon Seller Central connected, each marketplace order becomes an ACCREC invoice and each settlement posts its fees and payout as a journal automatically, split by marketplace through tracking categories. The bank deposit ties out to the ledger on its own, and the manual re-keying step is gone.

What you can do

  • Turn Amazon Seller Central orders into Xero ACCREC sales invoices against the correct contact and item code.
  • Post Amazon settlement fees, refunds, and net payouts into Xero as manual journals on the right account codes.
  • Push Xero item sales prices out to the matching Amazon listings so the storefront reflects accounting prices.
  • Bridge the Login with Amazon refresh token and Xero OAuth tenant access, with NextToken and page-based paging.
  • Reconcile against the asynchronous Amazon settlement report, with 429 backoff and a full audit trail per record.

Questions

Which direction does data move between Xero and Amazon Seller Central?
The main flow is Amazon into Xero. Orders become Xero ACCREC sales invoices and Amazon settlement events post as fee and payout journals. Item prices flow the other way, from Xero items out to Amazon listings, so the storefront reflects accounting prices. Reference data such as SKU and marketplace mapping is aligned in both directions.
Does the integration use Amazon push notifications or polling?
It polls on a schedule. SP-API does not send plain HTTP webhooks; its push events arrive only through AWS EventBridge or SQS, and there is no notification type for settlement or invoice results. ml-connector reads the Orders, Finances, and Reports APIs on a cadence tied to your settlement calendar instead.
How does it avoid duplicate invoices and stay within Xero's rate limits?
Xero has no idempotency key header, so ml-connector supplies the InvoiceID GUID on create, which Xero treats as an upsert, so a retry updates the same invoice rather than creating a second one. It also respects Xero's per-tenant limit of 60 calls per minute and 5,000 per day, using delta reads with If-Modified-Since and backing off on a 429 using the Retry-After header.

Related integrations

Connect Xero and Amazon Seller Central

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

Get started