Webhooks Set Up
Last updated
Last updated
Webhooks allow you to receive real-time notifications about the statuses of your payments and payouts, such as successful completion, failure, or cancellation. These notifications are sent whenever there are changes in the status of your transactions.
There are two ways to configure webhooks: you can set up webhooks globally or specify them individually for each payment or payout.
Global Webhook
A global webhook URL applies to all your payments and payouts. Any changes in their statuses will trigger a notification sent to this designated URL.
Go to Merchant Account → Settings → API Settings → Webhook → Change.
Enter your desired webhook URL and save the changes.
Individual Webhook
You can also specify a webhook URL for each individual payment or payout you create. This provides more granular control over notifications. If a webhook URL is not specified during payment/payout creation, the global webhook URL (if set) will be used.
Here's an example of how you can include the webhookUrl
in the request body using curl for an individual payment:
To ensure the integrity and authenticity of the data received through webhooks, it's crucial to verify the x-signature
in the headers against the request body using your secure API key.
Here's a breakdown of the verification process:
Retrieve the x-signature
from the request headers.
Compute a signature using your API key and the request body.
Compare the computed signature with the x-signature
from the headers.
Example
This process ensures that the data received is secure and has not been tampered with.