Request Signing
Verification Process
Example Verification in Node.js
const crypto = require("crypto");
function verifySignature(receivedSignature, requestPayload, SERVER_SECRET) {
const computedSignature = crypto
.createHmac("sha256", SERVER_SECRET)
.update(requestPayload)
.digest("hex");
return computedSignature === receivedSignature;
}
Example Signed Payload
Last updated