Skip to content
DevelopersGet an API key

Connect Harlo to Xero

Create a Xero sales invoice for every Harlo invoice, and apply payments as they're recorded.

You'll need

  • A Harlo admin login
  • Xero
  • A paid Zapier plan (Webhooks by Zapier is premium)

Before you start

In Xero, decide which revenue account freight goes to (for example 200, Sales) and, if you use item codes, create an item named FREIGHT.

Send new invoices to Xero

  1. Make a Harlo API key. In Harlo, open Settings, API keys, choose Create API key, name it Xero via Zapier, and copy it. You'll paste it in a moment; Harlo shows it only once.
  2. Start a Zap with this trigger:
    AppWebhooks by Zapier
    Trigger eventRetrieve Poll
    URLhttps://harlo-api-dev.pages.dev/v1/invoices?limit=25
    Keydata
    Deduplication Keyid
    HeadersAuthorization in the left box, Bearer hk_… (the word Bearer, a space, your key) in the right.
  3. Xero, Find or Create Contact, searching on Customer Name, with Customer Billing Email as the email for new contacts.
  4. Xero, Create Sales Invoice, and map:
    ContactThe contact from the previous step
    Date / Due dateInvoice Date / Due Date
    Invoice numberNumber
    ReferenceLoad Customer Reference
    StatusDraft while you test, then Awaiting payment
    Line items: DescriptionLines Description
    Line items: QuantityLines Quantity
    Line items: Unit priceLines Unit Price
    Line items: AccountYour freight revenue account
    Line items: Tax rateYour organisation's exempt or zero rate (Harlo amounts carry no tax)
  5. Test, then turn the Zap on.

Apply payments

  1. Trigger:
    AppWebhooks by Zapier
    Trigger eventRetrieve Poll
    URLhttps://harlo-api-dev.pages.dev/v1/payments?limit=25
    Keydata
    Deduplication Keyid
    HeadersAuthorization in the left box, Bearer hk_… (the word Bearer, a space, your key) in the right.
  2. Xero, Find Invoice by invoice number, with Invoice Number.
  3. Xero, Create Payment on that invoice: Amount, Received Date, your bank account, and Reference.

Record each payment in one place only: if your bank feed reconciles payments in Xero, skip this Zap.

If something's off

Invoice number already exists
Xero refuses duplicate numbers. Check the Zap isn't also running for invoices you entered by hand.
Tax was added
Set each line's tax rate to your exempt or zero rate, or make that the freight account's default.
  • When you turn the Zap on, Zapier notes the records already there and starts only for new ones. To bring older records across, see Spreadsheets and CSV for a one-time export.
  • Webhooks by Zapier is a premium app: it needs a paid Zapier plan. How often it checks depends on the plan.
  • Field names in Zapier match the API. Nested fields show with spaces, like Customer Name or Load Number.
NextGoogle Sheets