fix: Stripe webhook delivery failures (env + handler)#46
Draft
DealPatrol wants to merge 1 commit into
Draft
Conversation
- Require STRIPE_WEBHOOK_SECRET separately from signature header - Force Node.js runtime; log event id/type for Vercel debugging - Return 200 for unhandled event types; clearer 503 when env missing - Document repofuse.com webhook URL and env vars in VERCEL_SETUP Co-authored-by: Cole Collins <DealPatrol@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Stripe live mode reports 22 failed deliveries to
https://RepoFuse.com/api/stripe/webhooksince May 15, 2026. Stripe requires HTTP 2xx; 400/500 responses count as failures.Diagnosis
Production endpoint is reachable (not a DNS/routing issue). Probing shows:
stripe-signature→ previously returned400 Webhook not configured(confusing — same message as missing env vars)400 Invalid signature(route +STRIPE_SECRET_KEYwork; signing secret mismatch is the most common live failure)Code changes
503vs400)export const runtime = 'nodejs'for Stripe SDK compatibilityevent.id/event.typefor Vercel log correlation200for unhandled event types (avoid retries on noise)VERCEL_SETUP.mdand.env.exampleOperator checklist (required to fix live Stripe)
https://repofuse.com/api/stripe/webhookwhsec_...) → Vercel Production →STRIPE_WEBHOOK_SECRETSTRIPE_SECRET_KEYis live (sk_live_...) on Production200in Event deliveriesTesting
pnpm exec tsc --noEmitpasses