featured article

How to Set Up a Chart of Accounts in Xero for an Ecommerce Seller

Colleen Quattlebaum

August 1, 2026

The design rule that decides everything

Account codes answer "what kind of money is this." Tracking categories answer "where did it happen." Build your Xero chart of accounts on that split and it stays readable at 4 channels and 200 SKUs. Ignore it, create an account for every combination of channel and cost type, and by month nine you have 180 accounts, a profit and loss report nobody reads, and no way to compare Amazon gross margin against Walmart gross margin without exporting to a spreadsheet.

That is the whole idea. The rest is execution.

Why sprawl happens in Xero specifically

Intuit publishes hard usage limits for QuickBooks Online: a maximum of 250 accounts in the chart of accounts on Simple Start, Essentials, and Plus, with unlimited accounts only on Advanced, and combined classes and locations capped at 40 on Plus. Those caps are annoying, and they also act as a governor. When you are 30 accounts from the ceiling, you stop adding accounts.

Xero does not advertise an equivalent hard cap on the chart of accounts. That freedom is pleasant right up until it is not. Nothing in the software will stop you from creating "Amazon Referral Fees," "Walmart Referral Fees," "eBay Final Value Fees," "TikTok Referral Fees," and then doing the same thing for fulfillment, storage, returns, and advertising. Twenty accounts where four would do.

The numbering scheme

Xero lets you assign a code to each account and sorts reports by code. Reserve blocks so there is room to grow:

  • 200 to 299 revenue
  • 300 to 399 direct costs, which is where cost of goods sold and per unit selling costs live
  • 400 to 599 operating expenses
  • 600 to 699 current assets
  • 700 to 799 fixed assets
  • 800 to 899 liabilities
  • 900 to 999 equity

Leave gaps of ten between codes. You will need them.

Revenue

Four accounts carry a multichannel seller:

  • 200 Product Sales
  • 210 Shipping Income
  • 220 Discounts and Promotions, which runs as a contra revenue account with a debit balance
  • 230 Refunds and Returns, also contra

Do not add a fifth revenue account per marketplace. Channel goes in a tracking category.

Direct costs

These scale with units sold, and they belong above the gross profit line so your margin means something:

  • 300 Cost of Goods Sold
  • 310 Marketplace Commissions and Referral Fees
  • 320 Fulfillment Fees
  • 330 Merchant Processing Fees
  • 340 Inbound Freight and Duty, when not capitalized into inventory
  • 350 Shipping and Postage

A note on 340. Freight, duty, and inspection costs that attach to specific inventory should be capitalized into the cost of the units, not expensed on arrival. Landed cost allocation is what makes that possible, and it happens in the inventory layer, not in the chart of accounts. Account 340 is for the residual you genuinely cannot attach to units.

Operating expenses

Advertising deserves its own block because it is the cost you tune most often:

  • 400 Advertising, Marketplace
  • 410 Advertising, Paid Social and Search
  • 420 Software and Subscriptions
  • 430 Storage and Warehousing
  • 440 Contract Labor
  • 450 Professional Fees

Marketplace storage fees can go either way. Put them in 430 if you want a clean gross margin, or in the 300 block if storage genuinely tracks with volume in your business. Pick one and stop moving it.

Balance sheet

  • 600 Accounts Receivable
  • 610 Inventory
  • 620 Inventory in Transit
  • 630 Marketplace Settlement Clearing, one per channel
  • 640 Marketplace Reserve
  • 800 Accounts Payable
  • 810 Sales Tax Payable
  • 820 Gift Card Liability

Clearing accounts are the load bearing wall of marketplace accounting. Each one should return to zero after every settlement or payout cycle. A clearing balance that will not clear is a signal you have unmapped activity, and it is far more useful than a suspense account nobody reviews.

Tracking categories carry the channel dimension

Xero allows two active tracking categories per organization, with up to 100 options in each, according to Xero's tracking documentation. Two is a real constraint, so spend them deliberately.

For most sellers the right answer is:

  • Category 1: Sales Channel. Amazon, Shopify, Walmart, eBay, TikTok Shop, Wholesale.
  • Category 2: Brand or Product Line, if you carry more than one. If you carry one brand, use the second slot for Warehouse or leave it empty.

Once channel lives in a tracking category, Xero's profit and loss report will produce a column per channel from the same four revenue accounts and the same six direct cost accounts. That is the report you actually want, and it is unavailable to anyone who put channel into account names.

A worked month

Here is a September profit and loss for a seller running three channels, built on the structure above.

| | Amazon | Shopify | Walmart | Total |

|---|---|---|---|---|

| Product Sales | 214,600 | 88,400 | 61,200 | 364,200 |

| Shipping Income | 0 | 6,150 | 900 | 7,050 |

| Discounts and Promotions | (4,290) | (9,720) | (1,835) | (15,845) |

| Refunds and Returns | (10,730) | (3,536) | (2,754) | (17,020) |

| Net Revenue | 199,580 | 81,294 | 57,511 | 338,385 |

| Cost of Goods Sold | (78,330) | (30,140) | (22,850) | (131,320) |

| Commissions and Referral Fees | (32,190) | 0 | (9,180) | (41,370) |

| Fulfillment Fees | (36,482) | (4,910) | (11,655) | (53,047) |

| Merchant Processing Fees | 0 | (2,750) | 0 | (2,750) |

| Gross Profit | 52,578 | 43,494 | 13,826 | 109,898 |

| Gross Margin | 26.3% | 53.5% | 24.0% | 32.5% |

Read the Walmart column. Twenty four percent gross margin on 61,200 of product sales, after 20,835 of commission and fulfillment. That is a pricing conversation, and possibly a decision to stop listing certain SKUs on that channel. You cannot have that conversation from a blended 32.5 percent, and you cannot get the columns without tracking categories.

Three mistakes worth avoiding

Coding the payout instead of the sale. If revenue enters your books at the moment cash arrives, the numbers above are unreachable. Marketplace activity has to post at settlement or order level, then reconcile against the deposit. The Amazon and Xero setup works this way for a reason.

Netting fees against revenue. Booking a 199,580 net figure as sales removes 68,672 of cost from view. Both sides have to be gross.

Treating cost of goods sold as a plug. Many Xero files calculate cost of goods sold once a quarter by movement in the inventory account. That produces a number, and the number is an average of a quarter's worth of purchasing, not the cost of what you actually sold. FIFO costing at the SKU level is what turns account 300 into a fact.

Build order

  1. Delete or archive the default accounts you will not use, before any transactions exist.
  2. Import your chart from a CSV so codes and types are set in one pass.
  3. Create both tracking categories and all their options.
  4. Create clearing accounts, one per channel.
  5. Post one settlement or payout by hand, end to end, and confirm clearing zeroes.
  6. Only then connect the automation.

Step five is the one people skip and the one that catches the mapping error. More on how channel level reporting works sits on the profit reporting page, the Xero integration overview, and the general ecommerce accounting guide.

Take Control of Your E-Commerce Business with ConnectBooks

Running an e-commerce business comes with plenty of challenges, but ConnectBooks is here to make your life easier. With real-time insights, seamless integrations, and detailed tracking of your profitability and inventory, you can stay ahead of the game. Whether you’re selling on Amazon, Shopify, Walmart, TikTok or eBay, ConnectBooks helps you manage your finances with 100% accuracy and confidence, so you can focus on growing your business.

Ready to level up? Start making smarter, data-driven decisions every step of the way. Try ConnectBooks Free Today or Schedule a Demo