Step-by-Step Guide on How to Develop Xero Integration via API2Cart
In short, Xero integration through API2Cart takes three steps, from a free trial to working Xero data in your software.
Start a free trial
First, start your free 14-day trial and register your API2Cart account.
Connect your client's Xero organisation
Then, add the Client ID, Client Secret, and refresh token of your Xero app to API2Cart. After that, API2Cart refreshes the access token automatically, so you never store or rotate it yourself.
Build your Xero integration with API2Cart
Finally, develop an integration between your software and API2Cart's unified Accounting API.
List of methods for Xero Integration
For example, an OMS can create Xero invoices and record their payments, while a procurement tool can manage purchase orders and bills. In addition, these Xero integrations rely on the same unified Accounting API that API2Cart offers for other accounting platforms.
Account
-
account.list
Use this method to retrieve one or more accounts from a business entity's chart of accounts, as well as the total count of accounts. -
account.add
Use this method to create a new account. -
account.update
Use this method to update an existing account. -
account.delete
Use this method to delete an account.
Bill
-
bill.list
Use this method to retrieve one or more bills, as well as the total count of bills. -
bill.add
Use this method to create a new bill. -
bill.update
Use this method to update a bill. -
bill.credit_note.list
Use this method to retrieve one or more credit notes, as well as the total count of credit notes. -
bill.credit_note.add
Use this method to create a new bill credit note. -
bill.credit_note.update
Use this method to update a bill credit note. -
bill.credit_note.delete
Use this method to delete a bill credit note. -
bill.payment.list
Use this method to retrieve bill payments, prepayments, or overpayments. For platforms that support multiple payment types, use thetypeparameter to retrieve payments of a specific type. The response also includes the total count. -
bill.payment.add
Use this method to create a bill payment, prepayment, or overpayment. Use thetypeparameter to define the payment type to create. -
bill.payment.update
Use this method to update a bill payment, prepayment, or overpayment. -
bill.payment.delete
Use this method to delete a bill payment, prepayment, or overpayment.
Connection
-
connection.list
This method allows you to retrieve a list of all external platforms integrated with your account. -
connection.validate
This method clears the integration cache for a specific platform and verifies the current connection status. Use this method if there have been any changes to the external system's settings, such as the installation or removal of new plugins or modules. -
connection.supported_integrations
Use this method to retrieve a list of supported platforms integrations and the sets of parameters required for connecting to each of them. Note: some platforms may have multiple connection methods so that the response will contain multiple sets of parameters. -
connection.add
Use this method to automate the process of integrating external platforms with our API. The list of parameters will vary depending on the platform type. To get a list of parameters specific to a particular integration, you need to execute the connection.supported_integrations method. -
connection.update
Use this method to automate the update of credentials used for platform integrations. The list of supported parameters differs depending on the specific platform. -
connection.delete
Use this method to remove an existing platform integration from your account and stops all data synchronization for this specific connection.
Contact
-
contact.list
Use this method to retrieve one or more contacts, as well as the total count of contacts. -
contact.add
Use this method to create a new contact. -
contact.update
Use this method to update a contact. -
contact.delete
Use this method to delete a contact.
Invoice
-
invoice.list
Use this method to retrieve one or more invoices, as well as the total count of invoices. -
invoice.add
Use this method to create a new invoice. -
invoice.update
Use this method to update an invoice. -
invoice.credit_note.list
Use this method to retrieve one or more invoice credit notes, as well as the total count of invoice credit notes. -
invoice.credit_note.add
Use this method to create a new invoice credit note. -
invoice.credit_note.update
Use this method to update an existing invoice credit note. -
invoice.payment.list
Use this method to retrieve one or more invoice payments, prepayments, and overpayments, as well as their total count. -
invoice.payment.add
Use this method to record a new payment for an invoice. -
invoice.payment.update
Use this method to update an existing invoice payment.
Item
-
item.list
Use this method to retrieve one or multiple items, as well as the total count of items. -
item.add
Use this method to create a new item. -
item.update
Use this method to update an existing item. -
item.delete
Use this method to delete an item.
Organization
-
organization.list
This method allows you to retrieve a list of all organizations connected to the account in the corresponding accounting platform.
Purchase order
-
purchase_order.list
Use this method to retrieve one or more purchase orders, as well as the total count of purchase orders. -
purchase_order.add
Use this method to create a new purchase order. -
purchase_order.update
Use this method to update a purchase order. -
purchase_order.delete
Use this method to delete a purchase order.
Tax
-
tax.rate.list
Use this method to retrieve one or more tax rates, as well as the total count of tax rates.
Download Your Xero Integration Guide
Learn how to integrate with accounting platforms in an easy and unified way.
Inside you’ll discover:
- Integration Challenges: What SaaS providers usually face when connecting with accounting platforms.
- Unified API Solution: How one unified accounting API makes it easy to integrate with other accounting platforms.
- Use Cases: Industries that rely on successful integration development.
- Success Stories: How SaaS vendors simplified accounting integration development.
How API2Cart's Accounting API Works with Xero
The facts below are based on Xero's OAuth 2.0 and Accounting API documentation and the API2Cart connection guide.
What Xero Integration Covers
Through API2Cart, you can work with Xero contacts, invoices, invoice credit notes and payments, bills, bill credit notes and payments, accounts, tax rates, organisations, and purchase orders.
How the Xero Integration Connects
Xero uses OAuth 2.0 with scoped tenant connections. The API2Cart Xero connector stores three credentials and handles tenant selection and token refresh. As a result, your Xero API integration talks to one unified Accounting API instead of maintaining the OAuth flow.
One-Time Setup
You register a Xero app and authorise it once per organisation. After that, the connection keeps working without manual token updates.
Develop Integrations Faster with One Unified API
Trusted by
Ready to simplify Xero integration development?
Connect your SaaS to Xero and other accounting platforms faster and easier.
Xero Integration FAQ
What is Xero integration?
In other words, Xero integration connects your SaaS with your clients' Xero organisations. As a result, your software can retrieve, add, and update contacts, invoices, bills, payments, and purchase orders. With API2Cart, you build Xero integrations once through a unified Accounting API that also covers other accounting platforms.
Does Xero have an API?
Yes. Xero offers the Xero Accounting API, a REST API secured with OAuth 2.0. API2Cart uses it on your behalf, so your Xero API integration works through the same unified API as other accounting platforms.
How do I connect to the Xero API?
First, create a Web app in the Xero Developer portal. Then, authorise it for your client's organisation and add three credentials to API2Cart: Client ID, Client Secret, and refresh token. After that, API2Cart refreshes access tokens automatically. The full walkthrough is in our Xero connection guide.
How do I get a Xero Client ID and Client Secret?
Open your app in the Xero Developer portal and go to its Configuration page. There you can copy the Client ID and generate a Client Secret. Because Xero shows the secret only once, save it right after you generate it.
Download Free Integration Guide
Special Accounting API Integration via API2Cart
Fill in your details to get instant access to the Accounting Integration Guide. Everything you need to know — in one document.