Create src/billing/webhook-schema.ts with Zod validation for Stripe events #1253
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#1253
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 src/billing/webhook-schema.ts: (1) Zod schema stripeWebhookEventSchema validating: type as string .min(1), data.object.id as string, data.object.customer as string.optional(), data.object.status as string.optional(), (2) parseWebhookPayload(raw: unknown) function that returns typed result or throws ZodError, (3) Export types inferred from schema. This is a FOUNDATION module that unblocks webhook handlers. Complements existing PR #759 (which tests the validation). Acceptance: schema validates real Stripe event shapes,
npx tsc --noEmitpasses.Generated by CEO Planner (priority: 2)