feat(GRO-608): Add Stripe webhook handler for payment events
- Add POST /api/webhooks/stripe endpoint for Stripe event processing - Handle payment_intent.succeeded: mark invoice as paid, set paymentMethod=card - Handle payment_intent.payment_failed: record failure reason on invoice - Handle charge.refunded: mark invoice as void - Handle charge.dispute.created: log dispute - Idempotency: skip if stripePaymentIntentId already recorded - Add stripe_payment_intent_id, stripe_refund_id, payment_failure_reason columns - Requires STRIPE_WEBHOOK_SECRET env var for signature verification Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
"hono": "^4.6.17",
|
||||
"node-cron": "^3.0.3",
|
||||
"nodemailer": "^6.9.16",
|
||||
"stripe": "^22.0.0",
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user