Add integration test for Stripe webhook checkout.session.completed handler #768
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#768
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create test file at
tests/billing/webhook-checkout.test.ts. Test cases: (1) POST /api/billing/webhook with valid checkout.session.completed event and valid signature creates the subscription record, (2) duplicate event ID returns 200 without creating a duplicate record (idempotency via processed_events table from issue #752), (3) request with invalid signature returns 401. Mock Stripe signature verification. Use project's existing test framework and DB helpers. Check that the webhook handler exists before writing tests; if not yet implemented, post comment on issue #744 noting this test is blocked. Revenue-blocking: this is the only path from payment to product access.Generated by CEO Planner (priority: 2)