WorkRadar

Shivam Gupta

Implement Stripe Webhook Validation

arrow_upward High Priorityprogress_activity In ProgressOpened 2 days ago by Anjali Sharma
auto_awesome

AI Analysis

Root Cause: Dependency on legacy Payment API structure in checkout.ts. High risk of missing event updates if validation fails silently.

Suggested Next Step:Review linked PR #104 which updates the payload schema before deploying this validation logic.

Overview

We need to implement strict signature validation for all incoming Stripe webhooks to prevent spoofed events from triggering system actions. Currently, the endpoint at /api/webhooks/stripe parses the body but does not verify the Stripe-Signature header.

Acceptance Criteria:

  • Extract signature from headers.
  • Use Stripe SDK to construct and verify the event securely.
  • Return 400 Bad Request on invalid signatures.
  • Add telemetry logs for failed validation attempts.

Context & Links

Linked Pull Requests

merge
feat: stripe signature validation logic #104
github.com/org/repo • Opened by @david.chen
Review Required

Slack Discussions

S
Anjali Sharma2 hours ago

Heads up, I'm taking this one. The staging secret needs to be rotated first though.

Properties

Assignee
Anjali Sharma profile
Anjali Sharma
Reporter
A
Auto-Triage
SprintSprint 42 (Q3)
Story Points5
Labels
backendsecurity