Skip to main content

Overview

Autumn sends webhooks to notify your application of important events like:
  • Subscription changes (new, upgrade, downgrade, cancel)
  • Usage threshold alerts
  • Payment events
  • Balance updates
Webhooks are powered by Svix and include built-in signature verification, automatic retries, and a testing playground.

Setup

1. Create a Webhook Endpoint

Create an endpoint in your application to receive webhooks:

2. Configure Webhook in Dashboard

  1. Go to the Autumn dashboard → SettingsWebhooks
  2. Click Add Endpoint
  3. Enter your webhook URL (e.g., https://api.yourapp.com/webhooks/autumn)
  4. Select which events to receive
  5. Save and copy the Signing Secret to your environment variables
For local development, use tools like ngrok or Svix Play to expose your local server.

Event Types

customer.products.updated

Sent when a customer’s product subscription changes. Scenarios:
  • new - Customer subscribed to a new product
  • upgrade - Customer upgraded to a higher tier
  • downgrade - Customer downgraded to a lower tier
  • cancel - Customer canceled their subscription
Payload:
Example Handler:

customer.threshold_reached

Sent when a customer reaches a usage threshold (e.g., 80% of their limit). Payload:
Example Handler:

Security

Verify Webhook Signatures

Always verify webhook signatures to ensure requests are from Autumn:

Use HTTPS

Webhook endpoints must use HTTPS in production. Svix will reject HTTP endpoints.

Implement Idempotency

Webhooks may be delivered more than once. Use the svix-id header as an idempotency key:

Testing

Local Testing with Svix Play

  1. Go to Svix Play
  2. Generate a webhook URL
  3. Add it as a webhook endpoint in Autumn dashboard
  4. Trigger events (attach, track, etc.) and see them arrive in real-time

Send Test Events

Use the Autumn dashboard to send test webhook events:
  1. Go to SettingsWebhooks
  2. Click on your endpoint
  3. Click Send Example and select an event type

CLI Testing

Retries and Reliability

Autumn automatically retries failed webhook deliveries:
  • Retry Schedule: Exponential backoff (1min, 5min, 30min, 2hr, 5hr, 10hr, 10hr)
  • Success Criteria: HTTP 200-299 response
  • Timeout: 15 seconds per attempt
  • Total Attempts: Up to 7 retries over ~24 hours

Return Proper Status Codes

Debugging

View Webhook Logs

  1. Go to SettingsWebhooks in Autumn dashboard
  2. Click on your endpoint
  3. View delivery attempts, status codes, and response bodies

Common Issues

  • Check that you’re using the correct webhook secret
  • Ensure you’re passing the raw request body (not parsed JSON)
  • Verify all three Svix headers are present: svix-id, svix-timestamp, svix-signature
  • Verify your endpoint is publicly accessible (use ngrok for local dev)
  • Check that the endpoint uses HTTPS (required in production)
  • Ensure you’ve selected the correct events in webhook configuration
  • Check webhook logs in dashboard for delivery failures
  • This is normal behavior - implement idempotency using svix-id header
  • Check your handler is returning 200 on success

Best Practices

1

Process webhooks asynchronously

Return 200 immediately and process events in a background job:
2

Implement idempotency

Use svix-id to prevent duplicate processing:
3

Monitor webhook health

Track webhook failures and alert on repeated errors:
4

Version your webhook handlers

Plan for schema changes by versioning handlers:

Next Steps

API Reference

Explore all available endpoints

SDK Documentation

Learn how to use Autumn SDKs