What youβll build
A webhook handler that receives signed Request Network events, verifies the signature, and triggers your downstream systems β order fulfillment, invoice closeout, accounting entries, and customer email. It is idempotent and safe to retry. Audience: any backend integrating Request Network where payment events drive state changes downstream.Choose the events to handle
See the Webhooks reference for the current event catalog, recipient routing, payload examples, and legacy integrations. Use it to choose which events your handler needs; this guide focuses on processing each delivery safely.Setup
1
Choose the endpoint owner
To receive events as a platform, note its
clientId. To receive events as an orchestrator, use the key assigned to that orchestrator.2
Register an endpoint
Follow platform Client ID webhook setup or orchestrator webhook setup. Save the signing secret immediately; Request Network returns it only once.
3
Test delivery
Send a test delivery with the relevant platform or orchestrator endpoint in the Webhooks reference. Test deliveries include
x-request-network-test: true and placeholder data.Handler β reference implementation
A signature-verifying Express handler. It verifies against the raw body, uses constant-time comparison, passes the delivery ID to business handlers as their idempotency key, and lets Request Network retry a failed handler.200.
Headers reference
Retry policy
After 4 total attempts (initial + 3 retries) the delivery is dropped. Triggers: any non-2xx response, timeout, connection error. Default request timeout is 5s.
Common patterns
Idempotency
The samepayment.confirmed event might arrive twice (network blip, retry overlap). Use x-request-network-delivery as the idempotency key. Record it atomically with the business update in your durable store; do not use a check-then-act cache lookup, because overlapping deliveries can both pass the check.
For a local database update, add a webhook_deliveries table with a unique delivery_id column, then insert that ID in the same transaction as the business update:
Route events by Client ID
If you are an orchestrator working with several linked platforms, useclientId to identify the platform for an event. Store that Client ID with your own platform record when you link it.
Slack alerts on failure
Local development
Use ngrok to expose localhost during development:localhost, 127.0.0.1) are accepted by the auth API for testing. HTTPS is required in production.
Related
Webhooks reference
Full payload schemas for every event type.
Webhooks & Events
High-level concepts and event categories.