PAY-310 · Payment provider is disabling our webhook endpoint
The provider's dashboard shows 100% failures for POST /webhooks/payments and threatens to disable it. Their docs:
- Each delivery has
x-signature: t=<unix seconds>,v1=<digest> (see lib/signature.js). Reject a bad digest or a timestamp more than 5 minutes away with 401.
- Respond 2xx to every authentic event, including types you don't handle. Anything else is retried with backoff for 3 days.
Security also found that a request with a garbage signature still updated an order. And on the rare day something got through, paid orders showed as refunded.
The webhook secret is process.env.WEBHOOK_SECRET.