From 4ff02c4af8b54c07e56880d7ca397b2446ba76bf Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Sun, 12 Jan 2025 18:12:38 -0800 Subject: [PATCH] Update copy in start to make race conditions clearer --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index b79ff56..f13c6b6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ IMO, the biggest issue with Stripe is the "split brain" it inherently introduces There are [over 258 event types](https://docs.stripe.com/api/events/types). They all have different amounts of data. The order you get them is not guaranteed. None of them should be trusted. It's far too easy to have a payment be failed in stripe and "subscribed" in your app. -Trying to apply partial updates from Stripe is hellish. I recommend avoiding it entirely. My solution is simple: _a single `syncStripeDataToKV(customerId: string)` function that syncs all of the data for a given Stripe customer to your KV_. +These partial updates and race conditions are obnoxious. I recommend avoiding them entirely. My solution is simple: _a single `syncStripeDataToKV(customerId: string)` function that syncs all of the data for a given Stripe customer to your KV_. The following is how I (mostly) avoid getting Stripe into these awful split states. @@ -279,7 +279,6 @@ Gonna slowly drop more things here as I remember them. DISABLE "CASH APP PAY". I'm convinced this is literally just used by scammers. over 90% of my cancelled transactions are Cash App Pay. ![image](https://github.com/user-attachments/assets/c7271fa6-493c-4b1c-96cd-18904c2376ee) - ## Things that are still your problem While I have solved a lot of stuff here, in particular the "subscription" flows, there are a few things that are still your problem. Those include...