Renewable Energy

Biosus Energy: ERPNext–Xero Accounting Integration

How we built a bidirectional integration between ERPNext and Xero for two group companies — keeping invoices, purchase orders, and contacts in sync automatically.

About the Project

Biosus Energy is an Aberdeen-based renewable energy consultancy. We previously helped them deploy ERPNext in 5 weeks — replacing their fragmented SaaS stack with a unified platform for CRM, projects, and timesheets.

This follow-on project tackled a key gap: Biosus operates two group companies, both using Xero for accounting. They needed invoices, purchase orders, contacts, and payment statuses flowing bidirectionally between ERPNext and Xero — without manual re-entry or reconciliation.

Companies

2

Integrated

Auth

OAuth2

Token refresh

Sync

Real-Time

Webhook-driven

Direction

Bi-Dir

ERPNext ↔ Xero

The Challenge

Two Companies, One Workflow

Biosus operates two group companies, each with its own Xero organisation. Financial documents created in ERPNext needed to land in the correct Xero tenant automatically.

Manual Double-Entry

Staff were manually copying invoices and purchase orders between ERPNext and Xero — wasting hours each week and introducing reconciliation errors.

Payment Visibility Gap

Payments recorded in Xero weren't reflected in ERPNext, so the operations team lacked real-time visibility into which invoices had been paid.

The Solution

We built a custom Frappe app that connects ERPNext to both Xero organisations — syncing financial documents bidirectionally with OAuth2 authentication and webhook-driven updates.

OAuth2 Authentication

Secure OAuth2 connection to each Xero tenant with automatic token refresh — no stored passwords, fully compliant with Xero's API requirements.

Invoice Sync

Sales invoices submitted in ERPNext are automatically pushed to the correct Xero organisation — with line items, tax codes, and contact references mapped accurately.

Purchase Order Sync

Purchase orders flow from ERPNext to Xero, ensuring the accounts team has full visibility of committed spend without manual data entry.

Contact Synchronisation

Customers and suppliers are kept in sync between both systems — creating new contacts in Xero when they're added in ERPNext, and linking existing ones by reference.

Webhook Payment Updates

When payments are recorded against invoices in Xero, webhooks push the payment status back to ERPNext in real time — closing the reconciliation loop.

Multi-Company Routing

Documents are automatically routed to the correct Xero tenant based on the ERPNext company — no manual selection or switching required.

The Results

Zero

Manual data entry between systems

Real-Time

Payment status visibility

2 Tenants

Both companies integrated

Secure

OAuth2 with auto token refresh

Need a Custom Integration?

We build bespoke integrations between ERPNext and third-party systems — secure, real-time, and tailored to your business workflows.

Get a Free Consultation