Webhooks

Webhooks are used to communicate changes to a transaction or other entities within the Hurdlr API. If you subscribe to webhooks, then your server will be alerted every time an entity is modified.

1. How it works

By subscribing to receive webhooks, your server can asynchronously update data at the exact moment it becomes available. When that new data is available, the Hurdlr API will make a POST call to a URL of your choosing with the data needed for your server to update appropriately.

This approach ensures your users always have up-to-date data while removing unnecessary polls/refreshes from your server, saving you valuable resources.

2. Subscribing to receive webhooks

Hurdlr's API team is here to help! Simply email [email protected] with the subject line "Subscribe to Webhooks", and provide the following info:

a. Your API client_Id
b. Webhook URL for the Sandbox environment
c. Webhook URL for the Production environment

Our API team will respond back within 5 business days and will fire off sample webhooks to your Sandbox Webhook URL, for your team to develop/test with.

3. ENTITY_UPDATE

An "ENTITY_UPDATE" webhook will contain a JSON body like the following:

{
  "userId": "fake_userId",
  "type": "ENTITY_UPDATE",
  "entities": ["bankTransfer", "expense", "revenue", "taxPayment"]
}

The possible entities and recommended actions on how to update each given entity are listed below:

Webhook Type

Entity

Recommended action

ENTITY_UPDATE

bankTransfer

GET /bankTransfers

ENTITY_UPDATE

business

GET /businesses

ENTITY_UPDATE

client

GET /clients

ENTITY_UPDATE

expense

GET /expenses

ENTITY_UPDATE

expenseCategory

GET /expenses/categories

ENTITY_UPDATE

expenseRule

GET /expenses/rules

ENTITY_UPDATE

glEntry

GET /glEntries

ENTITY_UPDATE

invoice

GET /invoices

ENTITY_UPDATE

invoiceSetup

GET /invoiceSetup

ENTITY_UPDATE

personalExpenseCategory

GET /expenses/personalCategories

ENTITY_UPDATE

revenue

GET /revenues

ENTITY_UPDATE

revenueRule

GET /revenueRules

ENTITY_UPDATE

taxPayment

GET /taxPayments

ENTITY_UPDATE

userTaxSetup

GET /userTaxSetup