Xero Integration
Connect Xero to LostChurn for automatic invoice sync, payment reconciliation, and multi-currency support.
The LostChurn Xero integration keeps your books accurate as payments are recovered. Failed payments create invoices in Xero, successful recoveries record payments, and refunds generate credit notes -- all automatically.
What You Get
After connecting:
- Invoice creation -- Failed payments automatically create Authorised invoices in Xero with the original payment details.
- Payment recording -- When LostChurn recovers a charge, a Payment record is created against the matching invoice in Xero.
- Credit notes -- Refunds processed during recovery create Credit Notes linked to the original invoice.
- Two-way sync -- If an invoice is paid manually in Xero, LostChurn pauses dunning for that customer.
- Multi-currency -- Transaction currency is matched to Xero invoice currency. Exchange rates are applied automatically.
- Revenue reconciliation -- Daily reconciliation job at 02:00 UTC catches any events missed due to temporary connectivity.
Xero is a data sync integration, not a payment processor. LostChurn does not process payments through Xero. It pushes recovery outcomes so your financial records stay current without manual journal entries.
Prerequisites
- An active Xero account (any plan)
- Admin or Standard user access to your Xero organization
- A LostChurn account with at least one workspace created
Connect Your Xero Account
- In your LostChurn dashboard, go to Settings > Integrations and click Connect Xero.
- You are redirected to Xero's OAuth 2.0 authorization page.
- Select the Xero organization you want to connect.
- Review the permissions and click Allow Access.
- You are redirected back to LostChurn with the connection confirmed.
LostChurn requests these OAuth scopes:
| Scope | Purpose |
|---|---|
accounting.transactions | Create and update invoices, payments, and credit notes |
accounting.contacts | Read and create contacts for customer matching |
accounting.settings | Read chart of accounts, tax rates, and currencies |
offline_access | Maintain connection with refresh tokens (no re-authorization needed) |
OAuth tokens are stored securely and refreshed automatically using PKCE. LostChurn never stores your Xero password.
How the Sync Works
Failed Payment -- Invoice Created
When a payment failure is detected:
- LostChurn checks if a corresponding invoice exists in Xero.
- If not, LostChurn creates a new Authorised Invoice in Xero:
- Contact: Matched by email or created if new
- Due date: Set to the original payment date
- Line items: Reflect subscription or order details from your billing platform
- Reference: Tagged with
LostChurnfor easy filtering
- If a matching invoice already exists, it is left unchanged.
Recovery Succeeded -- Payment Recorded
When LostChurn recovers a failed payment:
- LostChurn finds the matching invoice in Xero by reference number.
- A Payment record is created against that invoice, marking it as paid.
- The payment is allocated to your configured account (default: Accounts Receivable).
- If no matching invoice exists, one is created and the payment is applied immediately.
Refund -- Credit Note Created
When a refund occurs during recovery:
- A Credit Note is created in Xero linked to the original invoice.
- The credit note reduces the outstanding balance on the invoice.
Xero to LostChurn
The sync works both ways:
| Direction | What Syncs |
|---|---|
| LostChurn to Xero | Invoices, payments, credit notes, payment allocations |
| Xero to LostChurn | Invoice paid in Xero stops dunning in LostChurn |
Two-way sync requires the webhook registered during OAuth. If you disconnect and reconnect, the webhook is re-registered automatically.
Configuration
Account Mapping
Configure account mappings under Settings > Integrations > Xero:
| Event | Default Xero Account | Customizable |
|---|---|---|
| Recovered payment | Accounts Receivable (200) | Yes |
| Refund / credit note | Accounts Receivable (200) | Yes |
| Recovery fee | Revenue - Other Income (460) | Yes |
Multi-Currency
LostChurn matches the source payment currency to the Xero invoice currency. If the currency does not exist in your Xero organization, the invoice is created in your base currency with the exchange rate applied.
Tax Rates
LostChurn uses your default Xero tax rate for new invoices. Override this per workspace in your LostChurn integration settings.
Troubleshooting
Connection shows "Disconnected"
- Xero OAuth tokens expire after 30 minutes. LostChurn refreshes them automatically using the
offline_accessscope. If refresh fails, click Reconnect in Settings > Integrations > Xero.
Invoices not appearing in Xero
- Verify the connection is active (green badge in Settings > Integrations).
- Check the sync log for errors. Common issues: missing currency in Xero, contact creation failed.
- Confirm your Xero organization has not hit API rate limits (60 per minute, 5,000 per day).
Duplicate invoices
LostChurn uses the recovery ID as the invoice reference to prevent duplicates. If you see duplicates, check whether the same recovery event was processed by multiple LostChurn workspaces.
Multi-organization
Connect each Xero organization to a separate LostChurn workspace. Each requires its own OAuth authorization.
Demo Company
Xero provides a Demo Company for testing. LostChurn fully supports connecting to Demo Companies. Events are labeled as test data.
Next Steps
- QuickBooks integration -- alternative accounting integration
- CRM sync settings -- configure CRM data sync
- Analytics dashboard -- track recovery performance