← All projects
Education and training

Splitting online payments between two businesses, reconciled in Xero

One shop, two sets of books. Every sale had to land in the right entity’s payment account and then match the right invoice, without someone sorting the money by hand each month.

Sector
Education and training
Engagement
Custom payment routing and reconciliation
Status
Built and tested against a copy of the live shop
Our role
Design, build, testing

What it does

One online shop taking money for two trading entities, with each order sent to the right payment account and matched to the right books.

Orders go to the right entity

Which entity takes the money is decided from what is in the basket, before payment is offered.

  • A per-product setting decides the entity, with category rules as the fallback
  • Only the card gateway that belongs to that entity is offered at checkout
  • Tested against the real installed payment plugins, not assumed from their documentation

Reconciliation where it already lives

The accounting system already matches payments to invoices. The build feeds it rather than competing with it.

  • Card payments and bank feeds flow into the accounting system through its own connectors
  • Matching handled by the accounting system’s bank rules
  • Cash receipts and transfers outside any bank feed entered as bank transactions by an automation
  • Paid status read back and written to the operational record

What it connects to

Most of the value in a system like this comes from the systems it talks to, and most of the risk does too. Each connection is scoped to the access it needs for the job.

Payments and accounting

  • Card processingOne account per entity
  • XeroBank feeds, bank rules and the payments API

Operations

  • WooCommerceCheckout, deposits and instalments
  • AirtableEnrolment and instalment record

The hard parts

The problems that decided how this was built. They are the reason it works the way it does rather than the obvious way.

Not building a reconciliation engine

The problem

The obvious answer to messy money is a custom matching system. It is also the part most likely to be wrong and hardest to audit.

What we did

Research into the bank and open-banking options showed the direct routes were closed or restricted, and the accounting system already did the matching. The build kept to routing and to the one gap it could not see.

The result

Less code to trust, and reconciliation that an accountant can read in the tool they already use.

Built with

PHPWooCommerceXero APIAirtableWorkflow automation

We don’t publish screenshots, logos or client names for this work. Much of it runs inside a business and handles sensitive data, so we describe what was built rather than who it was built for. We’re happy to walk through the detail on a call.

Ask a question

Tell us what your version of this needs to do and we’ll come back within one business day with scope, approach and a price.

What is your question about? (required)

Need something like this?

Every build on this page started as a workflow that off-the-shelf software nearly handled. Tell us where the gap is and we’ll scope what it takes to close it.