> For the complete documentation index, see [llms.txt](https://help.tahua.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tahua.io/knowledge-base/integrations-help-guides/xero/payment-integrations/credit-notes-with-a-xero-integration.md).

# Credit Notes with a Xero Integration

How credit notes raised in Xero flow back into Tahua as Milestone Credits, reducing the outstanding amount on a milestone.

Sometimes funding needs to be credited back rather than paid out, for example when a grantee returns unspent funds, a project is cancelled after a Bill has been raised, or an over-payment needs to be corrected. With the Xero integration connected, credit notes you raise in Xero are automatically reflected against the matching milestone in Tahua, so both systems stay in agreement without any manual updates.

<figure><img src="https://4124979405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F49pNEQ4fXNtxv0yJ5jgn%2Fuploads%2Fgit-blob-b37efafd3333293d4a5eec5bb6197bd4c3a5875a%2Fxero-credit-notes-flow.png?alt=media" alt="Flow of a credit note from Xero into Tahua"><figcaption><p>How a credit note travels from Xero into Tahua</p></figcaption></figure>

## How it works

**Step 1 — Raise a credit note in Xero**\
In Xero, create a credit note against the Contact as you normally would.

**Step 2 — Allocate the credit note to the Bill**\
Allocate the credit note to the Bill that Tahua created for the milestone. This allocation is how Tahua knows which milestone the credit belongs to. An unallocated credit note will not appear in Tahua.

**Step 3 — Tahua syncs the credit note**\
Tahua checks Xero for new or updated credit notes once a day (overnight). When it finds a credit note allocated against a milestone's Bill, it records a **Milestone Credit** in Tahua with the credit note's description, date, and the allocated amount (recorded exclusive of GST).

**Step 4 — The milestone updates automatically**\
The credit appears on the milestone's **Payments** tab under a **Credit Notes** heading, shown as a deduction alongside any payments. The milestone's outstanding amount is reduced accordingly, and:

* If payments plus credits cover the full milestone amount, the milestone is automatically marked as **Paid**.
* If the milestone amount is covered entirely by credits, it is flagged as **Fully credited**.

In the example below, a $5,000 milestone had $3,500 paid out and the remaining $1,500 credited back via a Xero credit note, leaving nothing outstanding:

<figure><img src="https://4124979405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F49pNEQ4fXNtxv0yJ5jgn%2Fuploads%2Fgit-blob-0adb97472691e091ca7e21c290c63665224fce3c%2Fxero-credit-note-milestone-payments.png?alt=media" alt="Milestone Payments tab showing a payment and a credit note"><figcaption><p>A milestone with a $3,500 payment and a $1,500 credit note, fully reconciled</p></figcaption></figure>

A milestone can also be covered entirely by a credit note, with no payment made at all:

<figure><img src="https://4124979405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F49pNEQ4fXNtxv0yJ5jgn%2Fuploads%2Fgit-blob-a6ca55f105409d4d31c801dd553d279b808a8919%2Fxero-credit-note-fully-credited.png?alt=media" alt="Milestone Payments tab showing a milestone fully covered by a credit note"><figcaption><p>A milestone fully credited by a Xero credit note, with no payments made</p></figcaption></figure>

## Credit notes and Payment Batches

Milestone Credits are also taken into account when building Payment Batches. The milestone selection screen shows a **Credits** column, and the amount to pay for each milestone is calculated as the milestone amount less any payments already made and any credits. A partially credited milestone will only be paid out for the remaining balance.

## Removing or changing a credit note

Credit note allocations are re-checked on every sync. If you remove the allocation (or void the credit note) in Xero, the corresponding Milestone Credit is removed in Tahua on the next sync, the outstanding amount is restored, and any **Fully credited** flag is cleared.

{% hint style="info" %}
Credit notes sync from Xero to Tahua only. You cannot create a credit note from within Tahua, so always raise and allocate credit notes in Xero.
{% endhint %}
