> For the complete documentation index, see [llms.txt](https://docs.zwapgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zwapgrid.com/client-portal/systems/setup-guides/xero.md).

# Xero

Create a Xero OAuth app and configure its Zwapgrid System Setting.

Xero is a cloud-accounting platform used by small businesses and advisers. Zwapgrid uses a client-managed Xero application, so a published System Setting is required before onboarding a Xero organisation.

| Item                        | Details                                                                                       |
| --------------------------- | --------------------------------------------------------------------------------------------- |
| Client Portal configuration | Required                                                                                      |
| Test option                 | Xero demo company                                                                             |
| Vendor documentation        | [Xero getting-started guide](https://developer.xero.com/documentation/getting-started-guide/) |

## Prepare a demo company and application

1. Create or sign in to a Xero account.
2. From **My Xero**, enable the demo company and choose the appropriate country.
3. In [Xero My Apps](https://developer.xero.com/app/manage), create an OAuth 2.0 application using the authorization-code flow.
4. Register the redirect URI displayed in the Zwapgrid System Setting.
5. Store the Client ID and generated Client Secret securely.
6. Confirm the scopes required by every API.1 and Proxy.1 operation you will use.

The demo company contains sample data and can be reset. Xero resets demo-company data periodically, which can require the application connection to be created again.

## Configure Zwapgrid

1. In the Client Portal, open **Systems → Xero → Configure**.
2. Create a System Setting for the Xero application.
3. Enter the Client ID and Client Secret.
4. Confirm that the registered redirect URI matches the Zwapgrid value exactly.
5. Save, review, and publish the setting.

See [System Settings](/client-portal/systems/system-settings.md) for lifecycle and Consent-selection rules.

## Test and move to production

1. Create a Development Consent using the published setting.
2. Connect the Xero demo company through the [Onboarding Flow](/onboarding-flow/onboarding-flow.md).
3. Test organisation selection and every required operation.
4. Review Xero's current connection limits, plan requirements, and certification rules before customer rollout.
5. Create a separate System Setting if your production application uses different credentials.

## Headless onboarding from your backend (Preview)

Use the [Xero headless onboarding guide (Preview)](/onboarding-flow/headless-onboarding/xero.md) for backend authorization, organization selection, the connection request body and recovery. Register your backend callback for that flow; the Zwapgrid redirect URI above is for guided onboarding.

{% hint style="warning" %}
Request only the Xero scopes your product needs. Treat the client secret and OAuth tokens as credentials and never include them in support messages.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zwapgrid.com/client-portal/systems/setup-guides/xero.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
