Guides · Free check · $9 fix pack

Guides

Missed a Stripe webhook? Reconcile paid customers against Stripe every day

One missed event and a customer has paid but still sees the free plan. Webhooks are the right way to fulfill, but they are not a guarantee on their own. A small daily job that asks Stripe "who paid?" and compares the answer with your database catches every gap, usually before the customer notices.

How events get missed

Stripe's own fulfillment guide says webhooks are "the most reliable way to confirm when you get paid", and also that you "can't rely on triggering fulfillment only from your checkout landing page" (Stripe docs: Fulfill orders). Neither path catches the cases above. A reconciliation job does, because it doesn't depend on delivery at all.

The source of truth: completed Checkout Sessions

List Checkout Sessions with status=complete and a created range (Stripe API: List Checkout Sessions). complete means "The checkout session is complete. Payment processing may still be in progress", so also check payment_status, which is one of paid, unpaid or no_payment_required and which Stripe says "You can use this value to decide when to fulfill your customer's order" (Stripe API: Checkout Session object). Match each session to your own record by session ID, or by client_reference_id, which Stripe describes as a value that "can be used to reconcile the Session with your internal systems" (source).

List calls return one page at a time (up to 100). Use the library's auto-pagination, which "automatically makes multiple API calls until has_more becomes false" (Stripe docs: Pagination), so a busy day doesn't hide sessions on page two.

The daily job

  1. Run it once a day from a cron (or every hour if you sell a lot). Look back a few days so a gap is never missed between runs, and skip sessions from the last hour, which may still be on their way through the webhook.
  2. For each completed session that isn't unpaid, look up the order in your database.
  3. If it isn't fulfilled, call the same run-once fulfill function your webhook calls. Stripe warns it "might be called multiple times, possibly concurrently, for the same Checkout Session" (source), so it must already be safe to repeat (duplicate events). Never write a second, different unlock path.
  4. If the job fixed anything, alert yourself. A gap means the webhook is broken, and fixing the customer is not the same as fixing the cause.
// reconcile-stripe.mjs: run daily from cron (Node 18+, stripe npm package)
import Stripe from 'stripe';
import { fulfillCheckout } from './fulfill.js'; // the SAME run-once function the webhook calls
import { db, notifyYourself } from './app.js';   // your database + alert (email, Slack...)

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
const now = Math.floor(Date.now() / 1000);
const fixed = [];

for await (const s of stripe.checkout.sessions.list({
  status: 'complete',
  created: { gte: now - 3 * 24 * 3600, lte: now - 3600 }, // last 3 days, skip the last hour
  limit: 100,
})) {
  if (s.payment_status === 'unpaid') continue; // delayed methods: wait for async_payment_succeeded
  const order = await db.orders.findBySessionId(s.id);
  if (order && order.fulfilled) continue;
  await fulfillCheckout(s.id); // retrieves the session, checks payment_status, records it once
  fixed.push(s.id);
}

if (fixed.length) {
  await notifyYourself('Reconcile fixed ' + fixed.length + ' paid sessions the webhook missed: ' + fixed.join(', '));
}

Rename the table, columns and helpers to match your app. Selling subscriptions? Also sync each customer's subscription status, not just the first checkout: see subscription status not updating.

Or reconcile from events (last 30 days only)

You can also list events of type checkout.session.completed, or only the ones that failed with delivery_success=false. The List Events API goes "back up to 30 days" (Stripe API: List events), and Stripe "continues its automatic retry schedule" for events you process by hand, so "When your endpoint receives an event you've already processed, skip it and return a 200 response" (Stripe docs: Process undelivered events). Events only cover delivery failures Stripe knows about. The Checkout Session check above also catches the wrong-URL, wrong-mode and "200 but did nothing" cases, and works for older payments.

Prompt for your AI builder

Add a daily Stripe reconciliation job. 1) Make sure there is one server-side fulfill function that takes a Checkout Session ID, retrieves the session from Stripe, returns early if payment_status is unpaid, and records fulfillment only once per session (safe to call many times, even concurrently). The webhook must call this same function. 2) Create a scheduled job that runs once a day, lists Checkout Sessions with status complete created in the last 3 days but more than 1 hour ago, using auto-pagination. 3) For each session that is not unpaid, look up the matching order by session ID or client_reference_id; if it is not fulfilled, call the fulfill function. 4) If any were fixed, send me an alert listing the session IDs. 5) Use a server-side Stripe key from environment variables; never expose it to the browser. 6) Do not change the webhook signature check.

Re-test

  1. In a sandbox, temporarily disable the webhook endpoint (or make the handler skip the write), complete a test checkout, and confirm the order stays unfulfilled.
  2. Run the job by hand. The order should be fulfilled once, and you should get the alert.
  3. Run it again: nothing should change and no alert should fire.
  4. Re-enable the endpoint. Then find out why events were missed and fix that too (find failing deliveries, test a fix without a new payment).
Check yours in 10 seconds (free).

Paste your webhook URL. WebhookProof sends 3 harmless test requests and tells you whether Stripe can reach it and whether it rejects unsigned events. If it finds a problem, the $9 fix pack gives you the exact copy-paste fix for your stack (refundable for 14 days).

Run the free check

FAQ

Why did my Stripe webhook miss an event?

Usually because the endpoint was down or erroring for longer than Stripe retries (up to three days in live mode, a few hours in a sandbox), the endpoint was disabled or deleted, it only exists in test mode or points at an old URL, or the handler answered 200 without saving anything.

How do I find customers who paid but never got access?

List Checkout Sessions with status complete for a date range, skip any whose payment_status is unpaid, and compare them with fulfilled orders in your database by session ID or client_reference_id. Any paid session without a fulfilled order is a gap.

Should the reconciliation job unlock access itself?

It should call the same idempotent fulfill function your webhook uses, so a customer is never unlocked twice or two different ways. Then alert yourself, because any gap means the webhook needs fixing.

Can I just replay events from the Events API instead?

For the last 30 days, yes: list events by type or with delivery_success=false and process them idempotently. Older events are not available, and events do not reveal a handler that returned 200 without doing anything, so the Checkout Session check is the safer daily job.

Sources

More guides

Stripe webhook not working? Check these 7 things in order · A customer paid but didn't get access. What went wrong? · No signatures found matching the expected signature for payload · Stripe webhook failing with a 307 or 308 redirect

Last reviewed 2026-11-04. WebhookProof is an independent tool, not affiliated with Stripe, Inc.. Quotes are from the linked documentation.