Modern companies use a lot of tools and systems to do business. However, many tools can come with a lot of confusion, and companies must ensure that their systems work together smoothly and efficiently. Financial and accounting systems do this through webhooks: find out how they work and how to integrate them here
Webhooks are a powerful real-time tool for automating and integrating various systems and applications. They help systems share important updates and messages quickly and offer a simple way for systems to get notified when something new happens.
Spend management software both receives and sends webhooks frequently. Let’s say you’re using your corporate cards on a business trip. When you pay for something, the card scheme, such as Visa or Mastercard, would notify the spend management platform that you made a new purchase to see it immediately. You (as the user) can take action right away, such as attaching an invoice or receipt to it. Then, as soon as the expense is reviewed by the accountant or finance automation software, another webhook happens to send the invoice data to the ERP or the bookkeeping system.
In more technical terms, a webhook transfers data to other applications immediately and on the go after it happens.
Financial systems and spend management platforms must deal with a lot of frequently changing data, for instance, new transactions, fluid account balances, invoices being issued and paid, and frequently changing budgets.
Without webhooks, these systems would have to constantly check (or "poll") each other to determine if anything has changed. In a nutshell, webhooks help financial systems and spend management platforms stay up-to-date and work together more efficiently. They ensure that everyone has the most recent information, which allows teams to make the most accurate decisions and maintain smooth operations.
Whether you're a developer looking to integrate Payhawk with your existing systems or a Payhawk user interested in leveraging webhooks, this guide will provide the necessary information to get started.
To begin using webhooks in Payhawk, you'll need to enable the developer API key for your account. This key allows you to access Payhawk's API and perform various operations programmatically. You can find the API key by navigating to "Settings -> API keys" in your Payhawk account. If your account doesn't have the API key enabled, contact us.
Webhooks in Payhawk can be seen under the "Webhook Subscriptions" section in the partner API section. Once there, you can see existing subscriptions and modify them as needed. Payhawk webhooks are managed separately for each individual entity.
To configure the specific events you want to receive notifications, simply add the webhook with the "Create Payhawk Subscription" endpoint. For testing purposes, we recommend using a service like https://webhook.site/, which allows you to inspect incoming webhook payloads.
The full list of events is under the "NewWebhookSubscription > EventType" in the Payhawk developer API documentation.
For example, if you want to receive notifications when new expenses are created, you can use the event "expense.created".
When a webhook is triggered, Payhawk sends a payload to the specified URL. The payload typically contains relevant data about the event that occurred. In the case of Payhawk's "expense.created" event, the payload will include essential information such as the expense ID. If needed, you can use the ID to make additional API requests via the Expenses Endpoints. This data is generally intended to synchronise information with external systems or trigger custom workflows.
By following the steps outlined in this guide, you can easily configure webhooks and leverage them to automate processes, synchronise data, and enable real-time notifications and integration capabilities with external software and systems. Here are some use cases of how to use webhooks in a custom integration:
The most classically used example is to transfer financial and invoice data to allow accountants to close the month faster. As soon as an expense is reviewed, the invoice data and categorisations are sent to the ERP. When a card payment has been settled, the payment amount and any additional FX info are sent via a webhook to synchronise the finance data with the general ledger account.
A supplier changed their invoice information, or an employee changed their bank account information: this is vital business information that should be synchronised to an internal system to properly transfer funds. Keeping such data up to date is often needed to avoid miscommunication and delays in business processes.
In some rare cases, if a bank transfer fails or a card payment gets rejected, this could be caused by the supplier's bank having a problem or the user's funds being insufficient to process the payment. A webhook could send that data to an alerting system or a notification system that will notify the user and allow for awareness and quicker reaction time.
If you have another example or need help with implementing a similar business case, share it with us at firstname.lastname@example.org. We would connect you to our vast network of implementation partners, who can do the needed customisations on your behalf or provide the required guidance and support to do so on your own. Additionally, our product team is always interested in producing those solutions, and your insights are invaluable to us.
Webhooks are key to ensuring seamless communication between various systems in today's businesses. They automate processes and facilitate real-time updates, especially in financial systems and spend management platforms.
By using webhooks, companies can enhance efficiency, keep their data current, and operate smoothly. Transform the way your systems communicate with our integrations today!
Learn more about our partner program and find out how to join our growing network of partners.
The Payhawk Editorial Team consists seasoned finance professionals boasting years of experience in spend management, digital transformation, and the finance profession. We're dedicated to delivering insightful content to empower your financial journey.