# 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.&#x20;

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.

{% hint style="warning" %}
**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.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payscore.com/webhooks/validating-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
