BlogXero Webhooks

How to Test Xero Webhooks

Xero webhooks notify your application when invoices, contacts, payments, and other accounting entities change.

Xero Official Webhook Docs

1. Xero Webhook Events

Xero can send the following webhook events to your endpoint:

INVOICE.CREATE
INVOICE.UPDATE
CONTACT.CREATE
CONTACT.UPDATE
PAYMENT.CREATE
MANUALJOURNAL.CREATE

2. Set Up a Test Endpoint with HookRay

Follow these steps to start receiving Xero webhooks for testing:

  1. Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
  2. Copy the URL (e.g., https://h.hookray.com/abc123).
  3. In your Xero dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
  4. Select the events you want to receive (see list above).
  5. Trigger a test event — HookRay will show the incoming webhook in real-time.

3. Sample Xero Webhook Payload

Here's an example of what a Xero webhook payload looks like:

payload.json
{
  "events": [
    {
      "resourceUrl": "https://api.xero.com/api.xro/2.0/Invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resourceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "eventDateUtc": "2026-03-20T17:45:00.000Z",
      "eventType": "Create",
      "eventCategory": "INVOICE",
      "tenantId": "t1e2n3a4-n5t6-i7d8-9abc-def012345678",
      "tenantType": "ORGANISATION"
    }
  ],
  "lastEventSequence": 2,
  "firstEventSequence": 1,
  "entropy": "ABC123XYZ"
}

4. Common Issues & Troubleshooting

Webhook not arriving?

Check that your endpoint URL is correct and publicly accessible. Xero cannot reach localhost URLs — use HookRay's cloud URL instead.

Getting 400 or 500 errors?

HookRay accepts any payload and returns 200 OK by default, so the issue is likely on Xero's side. Check your webhook configuration and event selection.

Need to verify webhook signatures?

Xero signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.

5. Next Steps

  • Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
  • Enable smart parsing (Pro plan) to see Xero-specific fields highlighted automatically
  • Check the Xero webhook documentation for the complete event reference

Ready to test Xero webhooks?

Get a free webhook URL in 5 seconds. No signup required.

Start Testing Xero Webhooks — Free