Webhooks
Alguna provides webhooks to notify you about events that happen in your account. Use webhooks to receive real-time notifications when customers subscribe, invoices are paid, payments fail, and more.Webhooks are delivered via Svix for reliable delivery with automatic retries.
Webhook Format
All webhooks follow the Standard Webhooks specification:Supported Events
Event Payloads
Subscription Events
subscription.activatedsubscription.version.updated for those.
draft, published
Subscription status values: draft, active, canceled
Invoice Events
invoice.issued / invoice.paidPayment Events
payment.created / payment.updatedpending_client_action- Requires customer actionpending_authorization- Awaiting authorizationprocessing- Being processedcompleted- Successfully processedfailed- Payment failed
Checkout Events
checkout.session.completedCredit Events
account.credits.grantedmonetary, units
Setting Up Webhooks
- Navigate to Settings → Webhooks in the dashboard
- Click Add Endpoint
- Enter your endpoint URL
- Select which events to receive
- Copy the signing secret for verification
- Save
Responding to Webhooks
Return a 2xx status code (200-299) within 15 seconds to acknowledge receipt. If using a framework with CSRF protection, disable it for your webhook endpoint.Verifying Webhook Signatures
Always verify webhook signatures to ensure they’re from Alguna. Use the Svix SDK:svix-idsvix-timestampsvix-signature
Retry Policy
Failed webhook deliveries are retried with exponential backoff:
If all attempts fail for 5 days, the endpoint is disabled.
IP Whitelist
If your endpoint is behind a firewall, allow these Svix IP addresses:Best Practices
Respond Quickly
Return 2xx within 15 seconds. Process asynchronously if needed.
Handle Duplicates
Use event IDs for idempotency. Events may be delivered multiple times.
Verify Signatures
Always verify webhook signatures using the Svix SDK.
Log Everything
Log event IDs for debugging and audit trails.
Next Steps
Webhooks Quickstart
Step-by-step webhook integration guide.
Svix Documentation
Detailed Svix documentation.