Storybooks for commit 1d0e70aa5588ad981946638f7888d621ce473223

Date
10/14/2026, 5:49:30 PM UTC
Summary
fix(payments): guard subscription writes on Stripe event time
Description
Because:

* fetchAndInsertSubscription wrote without stripeEventCreatedTime, so an
  older event's stale fetchAndInsertCustomer write could overwrite it
* legacyFetchAndInsertCustomer rewrote customer and subscription docs
  without stripeEventCreatedTime, which let a delayed older webhook
  overwrite them with stale data
* Reading Stripe inside the transaction repeated Stripe calls on every
  contention retry

This commit:

* Reads Stripe before the transaction in fetchAndInsertSubscription
* Skips subscription writes when a same-or-newer event is stored
* Stores stripeEventCreatedTime on subscription writes
* Passes event.created from processSubscriptionEventToFirestore
* Copies the stored stripeEventCreatedTime onto rewritten customer and
  subscription docs in legacyFetchAndInsertCustomer

Closes #PAY-3937