Validating Webhooks
When a webhook is sent, Payscore uses the webhook body and your secret key to create a hash signature, which is sent in the header Verification-Signature. The hash is created using HMAC-SHA256 and is hex encoded.
In order for you to validate that the webhook is legitimate, hash the raw webhook body using your secret key as the key, and then compare your generated signature with the Verification-Signature header value.
Do Not Parse or Cast the Webhook Request Body While generating the signature at your end, ensure that the webhook body passed as an argument is the raw webhook request body. Do not parse or cast the webhook request body.
Last updated