> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Xero Integration

> Connect and configure Xero accounting integration

Connect MemberPulse to Xero for automated accounting sync.

## Setup

<Steps>
  <Step title="Connect Account">
    Click "Connect to Xero" and authorize access
  </Step>

  <Step title="Map Accounts">
    Map MemberPulse transaction types to Xero accounts
  </Step>

  <Step title="Configure Tax">
    Set tax rates to match Xero configuration
  </Step>

  <Step title="Enable Sync">
    Enable automatic sync and set frequency
  </Step>
</Steps>

## Sync Options

| Data         | Direction | Frequency |
| ------------ | --------- | --------- |
| Contacts     | MP → Xero | Real-time |
| Invoices     | MP → Xero | Real-time |
| Payments     | MP → Xero | Real-time |
| Tax Receipts | MP → Xero | Real-time |

## Account Mapping

Map transaction types to Xero accounts:

* Membership revenue
* Event revenue
* Course revenue
* Resource sales

## Features

### Xero Integration

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described in this feature.

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## Implementation Contracts

### Backend (API)

```
POST   /api/integrations/xero/connect
GET    /api/integrations/xero/status
PUT    /api/integrations/xero/settings
PUT    /api/integrations/xero/account-mapping
POST   /api/integrations/xero/sync
GET    /api/integrations/xero/sync-log
```
