Production is locked until a market agreement is recorded

wh_orders_eu

https://api.bissaufoods.example/palopgo/orders

healthy100% in 24 h4 events

Settings

How this endpoint is configured

URL
https://api.bissaufoods.example/palopgo/orders
Signing secret
whsec_7b21················
Created
Thu 3 Sep
Last delivery
4 min ago
Failure alerts
plataforma@bissaufoods.example

Subscription

Events this endpoint receives

  • order.*
    • order.created
    • order.state_changed
    • order.cancelled
  • fulfilment.*
    • fulfilment.delivered

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

  • 17:44order.state_changed75 ms200
  • 17:32order.state_changed119 ms200
  • 17:31order.state_changed122 ms200
  • 17:30order.created121 ms200
  • 17:14order.state_changed76 ms200
  • 17:14order.state_changed77 ms200