Verifying this signature is a critical security measure to protect your endpoint from malicious or accidental requests.
Step-by-Step Verification Guide
You can find your secret key for each webhook endpoint in the Developers → Webhooks section of your meCash dashboard.
Step 1: Extract the Signature
Get the value of theX-Signature header from the incoming request.
Step 2: Prepare the Payload for Hashing
You must use the raw, unmodified JSON body of the request.Do not parse and re-stringify the JSON — changes in whitespace or key order will alter the computed hash and cause verification to fail.
Step 3: Compute Your Expected Signature
Calculate an HMAC-512 hash of the raw request body (from Step 2) using your endpoint’s secret key.Step 4: Compare the Signatures
Compare the signature you computed with the one from theX-Signature header.If they match, the request is valid.

