Webhooks
Injesting and validating Webhooks
Stratus subscriptions deliver events via webhooks, enabling your systems to respond immediately to key events.
Enabling Webhooks
To begin receiving webhook notifications:
-
Toggle Webhooks: Enable webhooks within your subscription settings.
-
Configure Endpoint: Provide the URL where your system will accept POST requests from the Snag subscription service.
Validating Webhooks
Each webhook payload is signed with a unique signing key, ensuring its authenticity. Use the Signing Key
from your subscription settings to verify the payload signature.
Below is a Next.js example demonstrating webhook validation:
Key Points:
-
Batching: Multiple events may be batched into a single webhook payload.
-
Retry Logic: Webhook requests are retried exponentially up to five times before marking them as failures.
-
Security: Always validate the webhook signature with your WEBHOOK_SECRET to ensure payload authenticity.
Was this page helpful?