A common recommendation for Stripe subscription webhooks is to fetch the latest subscription from the API instead of trusting the event payload. I do that too. It assumes the fetch returns state at least as new as the change the event describes. I couldn't find that promised in the Stripe docs, so I wanted to know what my handler does if it isn't true.
This post covers a narrow check I added, a demo of it, and where it fails. I haven't seen Stripe return a stale read myself. The demo simulates one.
What the docs say, and what they don't
Stripe's event destinations page describes snapshot event data as eventually consistent and possibly stale by the time you process it, and recommends fetching the latest object. That is about the event payload. I didn't find a statement about whether an API fetch made right after the event is guaranteed to include the change. If I missed one, tell me and I'll fix this post.
The case
A payment recovers. Stripe sends customer.subscription.updated with status: active, and previous_attributes says the status was past_due. Your handler fetches the subscription. Suppose the fetch still says past_due. If you write it, a customer who just paid stays locked out until a later event or a reconcile run fixes the row.
The check
If an event says a field went from A to B and the fetch still shows A, that is a possible stale-read signal. It is not proof, because a real later change could also put the field back to A (more on that below). This is a simplified version of my function:
function contradictsEvent(event, fetched) { if (event.type !== 'customer.subscription.updated') return null; if (Math.abs(Date.now() / 1000 - event.created) > 60) return null; const now = event.data.object; const before = event.data.previous_attributes; for (const field of ['status', 'cancel_at_period_end']) { if (field in before && now[field] !== before[field] && fetched[field] === before[field]) { return field; } } return null; } When it returns a field, nothing is written, not even the other fields. The handler waits and reads again, up to 9 reads with jittered backoff that starts at 25 ms and is capped at 1 second. The waiting alone adds up to under 4 seconds. Network time is on top of that. If every read looks stale, the handler answers 500 without writing, so Stripe's normal webhook retry applies.
Run it
Case 4 of the demo plays this out against a real Postgres, with a stand-in for Stripe that serves two old reads first. This is the real output:
4. A payment recovers (past_due -> active), but the first reads from Stripe still say past_due recovery event -> 200 succeeded PASS row was past_due, now active (revision 2) PASS the two stale reads were not written; Stripe was read 3 times That shows my handler copes with two supplied stale reads. It doesn't show that Stripe produces them, that they are common, or that the guard covers every stale case.
npm run demo takes about a minute and needs no Stripe account, and the README has a Codespace link if you don't want to install anything: stripe-subscription-sync (MIT).
Where it breaks
- Only snapshot events. The check reads
previous_attributes, which snapshot events carry. Thin event notifications don't, and the module doesn't handle them. Stripe's docs currently recommend thin events for new integrations, so this limits who can use it as is. - Only two fields.
statusandcancel_at_period_end. A stale value in any other field gets written. - Only events under 60 seconds old. I chose 60 as a cautious number, not a measured one. A late redelivery of an older event skips the check, and a stale read there would be written until the next event or reconcile run corrects it.
- A real fast flip back looks stale. If a subscription goes
past_due, thenactive, thenpast_dueagain inside the window, the first event's check seespast_dueand fails the delivery. The redelivery is older than 60 seconds, skips the check, and writes the current state. A test covers this. - Reconcile runs. They have no event to compare against, so a stale reconcile read can still overwrite newer state.
- API versions. The automated tests use synthetic 2025-03-31.basil and 2025-02-24.acacia shapes. One manual sandbox run saw 2026-09-30.endive events. Other versions weren't checked.
It is a defensive check, not a consistency guarantee.
Your turn
Have you seen a fetch return older state than the event that triggered it? Which field, and how long did it last? I'll turn real examples into tests and credit you in the changelog.

