Verify Webhook
When receiving a webhook from Loop, it is best if you verify its authenticity to prevent your application from receiving false information by malicious parties.
The verifyWebhook
function in the SDK achieves this by checking the signature of the payload against the expected signature.
Parameters
body
(string): The payload of the webhook request.signature
(string): The signature of the webhook request.
Returns
A boolean indicating whether the signature of the webhook is valid or not.
Example
Last updated