Webhooks
Webhooks allow you to get notifications that happen on your workspace. You might use webhooks to top up user balance when a payment complete, or to email a customer when a payment has been made
You can 'listen' for events that occur in your workspace at your chosen URL, where all event types will be broadcasted.
Webhook URL requirement:
Each webhook URL must be a complete, globally available HTTPS address (e.g.,
https:// example.com
).
Events are sent to your webhook endpoint URL associated with the workspace, as part of a POST request with a JSON payload.
Webhook types:
There are 4 webhook types:
Verifying the signature of incoming webhooks
An incoming webhook request has a header that should be used to verify the payload has not been tampered with.
The name of the header containing the signature - "Signature". The webhook is sent by a POST request, which contains JSON payload.
$computedSignature = hash_hmac('sha256', $payloadJson, $secret);
If the computedSignature and received signature does match return 200 http code after processing the payload.
If your server is temporarily unavailable or the status of the response is different from 200, we will resend the webhook several times with the increasing delay time.
Last updated