Skip to main content

Getting Started

This guide will walk you through setting up and securely handling webhooks. Our implementation follows the Standard Webhooks specification. Your webhook setup is simple: just define the URL where you want to receive event data. Here’s the Webhook Payloads page. Follow these steps to set up your webhook:
Idempotency (The “No Duplicates” Rule): Each webhook event includes a unique x-hyperrails-webhook-id header. Use this identifier to ensure duplicate webhook deliveries are safely ignored.

Securing Webhooks: Trust, but Verify

Every webhook request includes:
  • x-hyperrails-webhook-id – Unique identifier for the event.
  • x-hyperrails-webhook-timestamp – Unix timestamp (seconds) when the webhook was signed.
  • x-hyperrails-signature – HMAC-SHA512 signature, hex-encoded.

Signed content

The signature is computed over the following string (fields joined by a single period, no extra whitespace): .. using your Webhook Secret Key (found at Dashboard → Credentials → API Keys → Webhooks) as the HMAC key. Test and live mode each have their own webhook secret and webhook URL — configure both independently if you run staging and production listeners.

Verification example (Node.js)

Use a constant-time comparison (crypto.timingSafeEqual or equivalent) — never === — to avoid timing attacks.
When receiving a webhook:
  1. Verify the x-hyperrails-webhook-timestamp is within an acceptable time window (for example, 5 minutes).
  2. Recompute the signature using your webhook secret, the timestamp, and the raw request payload.
  3. Compare the computed signature with x-hyperrails-signature.
  4. Process the webhook only if both the timestamp and signature are valid.
Ordering is Not Guaranteed: Webhook events may be delivered out of order due to network retries. Always use the x-hyperrails-webhook-id or other data within the payload to ensure correct event processing, regardless of arrival sequence.
You will always receive the latest payload data at the time of delivery, regardless of when the webhook event was initially emitted.