POSTing Expenses to Xero

Last updated: February 6, 2026

Required common model fields

Core required fields

For posting an expense to Xero, the following fields are required at the top-level:

  • Account

  • Currency

  • Contact

The following fields are required for each line item:

  • Account

  • Net amount

Types of accounts

The top-level account must be a bank account. Use a Merge Account record where Account.account_type is BANK or CREDIT_CARD. Xero classifies credit card accounts as a bank account type.

Additional accounts, such as expense accounts, can be included on line items.

Currency

Xero enforces that the currency used for the Expense matches the currency of the bank account specified in the top-level account field.

Memos

Xero only supports Expense memos up to 250 characters.

Purchases

Purchases are reflected by negative values for the “net_amount” field in a line item. This results in a Spend Money transaction in Xero.

Refunds

Refunds are reflected by positive values for the “net_amount” field in a line item. This results in a Receive Money transaction in Xero.

Tracking Categories

Each line item can include up to two Tracking Categories. If two are provided, they should have different category_type values.

Xero will not fail the request if a line item includes two or more Tracking Categories of the same category type, but will instead choose the last one of the type and ignore the previous one(s) of the same type.

Request Examples

Create a purchase

{
  "model": {
    "transaction_date": "2025-08-20T00:00:00",
    "memo": "Customer onsite",
    "account": "4ae22979-9eb2-4782-ab94-bec26e857998",
    "contact": "30e85301-7c35-4844-ac43-030534c3da63",
    "currency": "USD",
    "total_amount": -4000,
    "lines": [
      {
        "description": "Hotel",
        "item": "07585cd9-6623-4dad-bd9e-990cd25f18b4",
        "account": "3df206bb-a548-41f3-bfb9-4f7a41df33fd",
        "net_amount": -4000,
        "tracking_categories": ["a05b6bf4-bd66-4593-923f-34b63ee0798b"]
      }
    ]
  }
}

Create a refund

{
  "model": {
    "transaction_date": "2025-08-20T00:00:00",
    "memo": "Customer onsite refund",
    "account": "4ae22979-9eb2-4782-ab94-bec26e857998",
    "contact": "30e85301-7c35-4844-ac43-030534c3da63",
    "currency": "USD",
    "total_amount": 4000,
    "lines": [
      {
        "description": "Hotel refund",
        "item": "07585cd9-6623-4dad-bd9e-990cd25f18b4",
        "account": "3df206bb-a548-41f3-bfb9-4f7a41df33fd",
        "net_amount": 4000,
        "tracking_categories": ["a05b6bf4-bd66-4593-923f-34b63ee0798b"]
      }
    ]
  }
}