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.
crypto "node:crypto"; verify(rawBody, header, secret) { // one t, one or more v1 — a rotating secret sends both signatures. pairs = header.split(",").map((p) => p.trim().split("=")); t = pairs.find(([k]) => k === "t")?.[1]; signatures = pairs.filter(([k]) => k === "v1").map(([, v]) => v); if (!t || signatures.length === 0) ; if (Math.abs(Date.now() / 1000 - Number(t)) > 300) ; expected = Buffer.( crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex"), ); signatures.some((sig) => { given = Buffer.(sig); given.length === expected.length && crypto.timingSafeEqual(expected, given); });}Test
Send a test event
Recent