Webhooks in meCash are signed with HMAC-SHA256 to ensure authenticity and integrity.
This guide shows you how to verify webhook signatures in different programming languages.
Each webhook request includes a signature in the X-meCash-Signature header. You must verify this signature to ensure the webhook came from meCash and wasn’t tampered with.
Make sure to use the raw request body for signature verification:
// Express.js: Use raw middlewareapp.use('/webhook', express.raw({ type: 'application/json' }));// Or use body-parser with raw optionapp.use(bodyParser.raw({ type: 'application/json' }));