Principles
- Idempotency: the same event processed twice must not create two cases.
- Retries: transient failures should be safe to retry.
- Signatures: validate source authenticity when available.
Local MVP endpoint
For the MVP, Stripe webhook handling is simplified; production deployments enforce signatures and idempotency keys.
POST /api/chargewise/webhook/stripeRecommended patterns
- Store processed event IDs per integration.
- Write audit event for every webhook received.
- Retry with backoff and dead-letter queues for poison messages.