Production is locked until a market agreement is recorded

wh_catalog_sync

https://pos.bissaufoods.example/hooks/palopgo

paused97% in 24 h2 events

Settings

How this endpoint is configured

URL
https://pos.bissaufoods.example/hooks/palopgo
Signing secret
whsec_3fa9················
Created
Wed 16 Sep
Last delivery
on Mon 5 Oct
Failure alerts
None set

Subscription

Events this endpoint receives

  • catalog.*
    • catalog.offer_rejected
    • catalog.availability_changed

Verify

Check the signature before you trust the body

The header carries the timestamp and one or more signatures. Reject anything older than five minutes, and compare in constant time.

verify.ts
import crypto from "node:crypto"; export function verify(rawBody, header, secret) {  // one t, one or more v1 — a rotating secret sends both signatures.  const pairs = header.split(",").map((p) => p.trim().split("="));  const t = pairs.find(([k]) => k === "t")?.[1];  const signatures = pairs.filter(([k]) => k === "v1").map(([, v]) => v);  if (!t || signatures.length === 0) return false;  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;   const expected = Buffer.from(    crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex"),  );  return signatures.some((sig) => {    const given = Buffer.from(sig);    return given.length === expected.length && crypto.timingSafeEqual(expected, given);  });}

Test

Send a test event

Recent

Last deliveries