Beacon

Webhooks API

View as Markdown

Webhooks API

Contracts for event ingestion, controlled replay, and operational traceability.

reference • updated 2026-03-15

Goal

Ingest Stripe events with signature verification, event-level deduplication, and controlled replay for incident recovery.

Primary endpoints

EndpointUsageSecurity
POST /v1/webhooks/stripegeneral Stripe event intakeStripe signature required
POST /v1/webhooks/stripe/billingbilling/subscription-specific eventsStripe signature required

Processing model

  1. 11) Receive event

    Validate signature and minimum payload shape.
  2. 22) Deduplicate

    Use provider event.id as the logical idempotency key.
  3. 33) Queue processing

    Run async handlers with safe retry semantics.
  4. 44) Confirm state

    Update business state and delivery metrics.

Received event example

json
{
  "id": "evt_123",
  "type": "invoice.paid",
  "created": 1710492000,
  "data": {
    "object": {
      "id": "in_123",
      "customer": "cus_123"
    }
  }
}

Retry and replay policy

  • Automatic retries must preserve original event context.
  • Manual replay must be scoped by time window and organization.
  • Avoid broad replay operations without impact prioritization and explicit validation criteria.

Operational signals

SignalMeaningAction
rising 4xxsignature/payload mismatchrotate secret if needed and revalidate contract
growing backlogslow or blocked consumerincrease throughput and prioritize critical events
duplicated side effectsincomplete deduplicationharden dedupe key by event.id + organization