payments.verify wired, automate fulfillment using HTTP callbacks. This page covers the cryptography—before treating any JSON blob as authoritative.
Unseen delivers signed webhook POST bodies. Confirm authenticity before parsing JSON:
rawBodyString— the raw request payload exactly as received. With Express, configure aexpress.raw-style middleware orbodyParser.rawfor this route only soreq.bodyis aBufferyou convert to UTF-8 string before verify. Do not verify againstJSON.stringify(req.body)afterexpress.json()already mutated the bytes.signatureHeader— value ofX-Unseen-Signature(hex HMAC-SHA256 of the raw body with your webhook secret).secret— signing secret from the Unseen dashboard.
Testing
unseen.webhooks.sign(payload, secret) reproduces the hex digest for fixtures and integration tests.
Next: Errors & types