Signed webhooks
Signed payment webhooks with a delivery ledger
When money settles we POST it to your server, signed with your own secret. If your server is down we keep trying, and you can see every attempt and resend any payment from the dashboard.
Every webhook carries an X-MyPayments-Signature: a timestamp and an HMAC-SHA256 of the raw body.
// X-MyPayments-Signature: t=<unix seconds>,v1=<hex>
const { t, v1 = "" } = Object.fromEntries(
String(req.headers["x-mypayments-signature"] ?? "").split(",").map((p) => p.split("=")));
const expected = crypto.createHmac("sha256", process.env.MYPAYMENTS_SECRET)
.update(`${t}.${rawBody}`).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
if (!fresh || v1.length !== expected.length ||
!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1)))
return res.status(401).end();How signed webhooks works
Verify in five lines
Compute HMAC-SHA256 of the timestamp and raw body with your secret and compare. A replayed request fails the timestamp check; a forged one fails the signature.
Rotate without downtime
Rotate the signing secret from the dashboard. The new one is shown once; update your server and carry on.
Only real endpoints
We deliver over verified TLS and refuse private and cloud-metadata addresses, so a webhook URL cannot be turned against a network.
Questions about signed webhooks
What if my server misses a webhook?
We retry with backoff, and you can resend from the transaction page or poll the transaction by reference.