Skip to content

Xero

Connect fyrn to Xero to automate accounting workflows — create invoices, manage contacts, record payments, and track bank transactions through the Xero API.

Property Value
Type http
Authentication oauth2
Category Finance & Accounting
Field Type Required Description
tenant_id string Yes Xero tenant ID (organisation UUID)
client_id string Yes Xero OAuth2 client ID
client_secret string Yes Xero OAuth2 client secret
refresh_token string Yes OAuth2 refresh token

Create a new invoice in Xero. Supports both Accounts Receivable (ACCREC) and Accounts Payable (ACCPAY) invoices.

Endpoint PUT /Invoices
Method PUT

Retrieve a single invoice by its ID from Xero.

Endpoint GET /Invoices/{InvoiceID}
Method GET

List invoices from Xero with optional filtering and pagination.

Endpoint GET /Invoices
Method GET

Create a new contact (customer or supplier) in Xero.

Endpoint POST /Contacts
Method POST

Retrieve a single contact by ID from Xero.

Endpoint GET /Contacts/{ContactID}
Method GET

List contacts from Xero with optional filtering and pagination.

Endpoint GET /Contacts
Method GET

Record a payment against an invoice in Xero.

Endpoint PUT /Payments
Method PUT

List bank transactions (spend or receive money) from Xero.

Endpoint GET /BankTransactions
Method GET

List all accounts from the chart of accounts in Xero.

Endpoint GET /Accounts
Method GET

Create a credit note in Xero to record a refund or credit against a contact.

Endpoint PUT /CreditNotes
Method PUT
name: shopify-refund-to-xero
description: When a Shopify order is refunded, create a credit note in Xero and update the contact
trigger:
type: webhook
event: shopify.refund.created
steps:
- id: find-contact
connector: xero
action: list-contacts
params:
where: 'EmailAddress == "{{ trigger.body.order.customer.email }}"'
- id: create-credit-note
connector: xero
action: create-credit-note
params:
Type: "ACCREC"
Contact:
ContactID: "{{ steps.find-contact.result.Contacts[0].ContactID }}"
Date: "{{ trigger.body.created_at | date: '%Y-%m-%d' }}"
LineItems:
- Description: "Refund for order {{ trigger.body.order.name }}"
Quantity: 1
UnitAmount: "{{ trigger.body.transactions[0].amount }}"
AccountCode: "200"
- id: update-contact
connector: xero
action: create-contact
params:
ContactID: "{{ steps.find-contact.result.Contacts[0].ContactID }}"
Name: "{{ steps.find-contact.result.Contacts[0].Name }}"
ContactStatus: "ACTIVE"