> For the complete documentation index, see [llms.txt](https://docs.stayonhire.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stayonhire.com/integrations/xero/recording-payments.md).

# Recording Payments

## Overview

For the best experience, we recommend having your Xero integration set as below for recording invoice payment sync behaviour and direction:

* Xero Resource: Payments "Toggled on"
* Sync Direction: "StayOnHire sends & receives"
* StayOnHire Edibility: "Can be edited"

<figure><img src="/files/vEfT7RGyRi4EcyDUnvNJ" alt=""><figcaption><p>This configuration page is accessible in the settings of your StayOnHire account</p></figcaption></figure>

## Configuration & Setup

To ensure your integration is set correctly, complete the following checklist:

1. Complete the Xero [Getting Started](/integrations/xero/getting-started.md) guide

## How it Works

A simple overview of how Xero recording invoice payments will look in your business:

1. An invoice is synced between StayOnHire and Xero&#x20;
2. Payments recorded on these invoices will be updated in both Xero and StayOnHire, including amounts paid, account etc.
3. Outstanding invoices and amounts due remain consistent between your StayOnHire and Xero accounts and all active jobs

## Testing your integration

{% hint style="danger" %}
The following steps will record an invoice in your Xero account once completed. Please consult your accountant or bookkeeper to ensure this does not cause unnecessary confusion or complications for your team.
{% endhint %}

To test an invoice sync to your Xero account, follow the below steps:

### Confirm StayOnHire Receives

#### 1. Add a payment in Xero

Find an invoice that has synced between your StayOnHire and Xero accounts.&#x20;

Add a payment using the standard Xero user interface button:

<figure><img src="/files/lkvke1UlIYMmu6WDeAMN" alt=""><figcaption></figcaption></figure>

#### 2. Sync invoice&#x20;

Manually sync the invoice to see the new payment reflected in StayOnHire:

{% hint style="info" %}
Invoice payments made in Xero will automatically sync every hour on the round hour (i.e 1PM, 2PM etc.) if not manually triggered as pictured below.
{% endhint %}

<figure><img src="/files/tzkccSXzR8P8gE4YkOdI" alt=""><figcaption></figcaption></figure>

### Confirm StayOnHire Sends

#### 1. Add a payment in StayOnHire

Find an invoice that has synced between your StayOnHire and Xero accounts.

From your StayOnHire account, record a payment:

<figure><img src="/files/etacVl7QJQyTIOx3Z4MP" alt=""><figcaption></figcaption></figure>

#### 2. Refresh your Xero invoice page

New payments added in StayOnHire will now be updated in both your Xero and StayOnHire accounts:

<figure><img src="/files/o6X4l4JIKq63DDoFIlVZ" alt=""><figcaption></figcaption></figure>

## Payment History

To view a history of payments in StayOnHire, click the 'Payment Status' field at the top of any of your approved invoices and select the option 'View payment history':

<figure><img src="/files/Fugx5MWXpQ0RXzbvyqlY" alt=""><figcaption></figcaption></figure>

A bottom sheet detailing payment logs will display payment details:

<figure><img src="/files/kCDRr152U16baSVbtto0" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stayonhire.com/integrations/xero/recording-payments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
