Add Stripe webhook event replay endpoint for admin debugging #1535

Open
opened 2026-04-14 07:34:52 -04:00 by pook · 0 comments
Owner

Create an admin endpoint to replay a specific Stripe webhook event for debugging billing issues.

Requirements:

  1. Create POST /api/admin/webhooks/replay with body: { eventId: string }
  2. Fetch the event from Stripe API: stripe.events.retrieve(eventId)
  3. Re-process the event through the existing webhook handler logic
  4. Log the replay with: original timestamp, replay timestamp, event type, outcome
  5. Require authentication + simple admin check (env var ADMIN_USER_IDS or similar)
  6. Return: { replayed: true, eventType, processedAt }
  7. Rate limit to 5 replays per hour per admin user

Acceptance criteria:

  • Can replay a specific Stripe event by ID
  • Existing webhook handler logic reused (not duplicated)
  • Non-admin users get 403
  • Rate limited to prevent abuse

Generated by CEO Planner (priority: 3)

Create an admin endpoint to replay a specific Stripe webhook event for debugging billing issues. Requirements: 1. Create POST /api/admin/webhooks/replay with body: { eventId: string } 2. Fetch the event from Stripe API: stripe.events.retrieve(eventId) 3. Re-process the event through the existing webhook handler logic 4. Log the replay with: original timestamp, replay timestamp, event type, outcome 5. Require authentication + simple admin check (env var ADMIN_USER_IDS or similar) 6. Return: { replayed: true, eventType, processedAt } 7. Rate limit to 5 replays per hour per admin user Acceptance criteria: - Can replay a specific Stripe event by ID - Existing webhook handler logic reused (not duplicated) - Non-admin users get 403 - Rate limited to prevent abuse --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1535
No description provided.