```yaml
product: AlterLab
title: Webhooks API Reference
category: api
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/docs/api/generated/webhooks
```

# Webhooks API Reference

Auto-generated API reference for webhooks endpoints, built from the OpenAPI spec.

## POST /api/v1/webhooks/stripe

Stripe Webhook
Stripe webhook handler with full event processing (PAYG model). Handles: - checkout.session.created: Schedule the abandonment recovery email (+1h) - checkout.session.completed: Grant balance credits for deposits + auto-recharge setup; cancel recovery emails - checkout.session.expired: Release promo code reservations - payment_intent.succeeded: Auto-recharge balance grants (type=auto_recharge) - payment_intent.payment_failed: Auto-recharge failure tracking (type=auto_recharge) - payment_intent.requires_action: Auto-recharge SCA/3DS handling (type=auto_recharge) - customer.subscription.*: Sync subscription status (no plan-based logic) - customer.updated: Sync customer default payment method - invoice.created: Store invoice record for audit trail - invoice.upcoming: Log upcoming invoices - invoice.payment_succeeded: Store invoice payment record - invoice.payment_failed: Notify user of payment failure - payment_method.attached/detached/updated: Sync payment methods + auto-recharge PM lifecycle - setup_intent.succeeded: Set default payment method - radar.early_fraud_warning.created: Handle fraud alerts - charge.refunded: Debit user balance when Stripe refund fires (chargeback or admin refund) - charge.dispute.created: Flag user account on chargeback dispute, notify admins - charge.dispute.closed: Claw back disputed deposit credit when the dispute is lost Security: - Verifies webhook signature using Stripe webhook secret - Uses idempotency keys to prevent duplicate processing - Logs all events to webhook_events table for audit trail

Authentication: `X-API-Key: <your key>`

## POST /api/v1/webhooks/{token}

Public Webhook Trigger
Trigger a workflow via its shareable trigger URL. No authentication required — the token IS the credential. External systems POST to this endpoint; the request body is injected as ``trigger_data`` into any ``webhook_trigger`` nodes. Returns 404 for missing or revoked tokens (no information leakage). Returns 400 for inactive (draft/archived) workflows. Returns 429 when the per-token rate limit (10 req/min) is exceeded.

Authentication: `X-API-Key: <your key>`

| Parameter | In | Type | Required | Description |
|-----------|----|------|----------|-------------|
| `token` | path | `string` | yes |  |
