This extension enhances the CiviXero integration by filtering which "Pending" contributions are pushed to Xero. It distinguishes between "Pending (Pay Later)" contributions and "Pending (Incomplete Transaction)" contributions, ensuring only genuine Pay Later invoices are synchronized with Xero.
When users choose to pay later at checkout, these contributions should be pushed to Xero as invoices. However, when online payment transactions fail or are incomplete, these should NOT be pushed to Xero. This extension implements that logic by checking the is_pay_later flag on contributions before allowing them to sync.
This is an extension for CiviCRM, licensed under AGPL-3.0.
- CiviCRM 5.x or later
- nz.co.fuzion.civixero extension
- nz.co.fuzion.accountsync extension
- Download or clone this extension to your CiviCRM extensions directory
- Navigate to Administer → System Settings → Extensions
- Find "Xero Pending Filter" and click Install
- Clear CiviCRM caches
The extension implements the hook_civicrm_accountPushAlterMapped() hook to inspect each contribution before it's pushed to Xero. It checks:
- Is the contribution status "Pending"? (contribution_status_id = 2)
- Is the
is_pay_laterflag set?- YES (
is_pay_later = 1): This is a legitimate Pay Later contribution → Allow push to Xero - NO (
is_pay_later = 0): This is an incomplete transaction → Block push to Xero
- YES (
For issues, questions, or contributions, please file an issue in the extension repository.