Overview
When integrating with PaySway, you often need your applications to respond automatically whenever important events occur. This is where webhooks come into play. Instead of constantly polling for updates, you can rely on PaySway to send notifications to your systems in real time whenever new activity happens.
A webhook is simply a secure HTTPS endpoint that you host within your backend. Whenever an event occurs in PaySway, it will send an HTTPS request containing a JSON payload to your webhook. This payload includes an object which carries all the necessary details about what happened.
After you register your webhook endpoint, PaySway pushes real-time event data to it for any relevant activity in your organization. This means your systems can immediately update internal records, send out notifications, or trigger any follow-up processes the moment something important occurs in PaySway.
Implementation steps
Below is our recommended approach to setting up a webhook endpoint for handling PaySway events. The process involves three main steps:
Build your webhook handler
Learn about the requirements for creating a webhook handler in your backend environment.
Register your endpoint
Notify PaySway about your newly created endpoint by registering it through the API. This step explains how to create and manage your webhook subscriptions.
Protect your integration
Make sure your endpoint only accepts genuine requests from PaySway by verifying all incoming traffic.