Idempotency keys for webhooks: the ten lines that stop double charges
Webhook providers deliver at least once, so your handler will see duplicates. A unique key and one transaction in Postgres make that harmless.
A group blog in the old style: no tracking pixels, a full-text RSS feed, and posts long enough to include the actual code. Est. 2026, still typing in a terminal.
In brief
Webhook providers deliver at least once, so your handler will see duplicates. A unique key and one transaction in Postgres make that harmless.
Three top-level folders, one dependency rule and pnpm filters for CI. The monorepo structure we keep coming back to, and what we stopped doing.
Start here
Node.jsA postmortem of a slow leak in a Node ingest service: how two heap snapshots, one retainer chain and a silenced warning led us to the bug.
A date test that passed for months failed on a CI runner in Berlin. What we learned about DST, local midnight and testing code that reads the clock.
For most teams, feature flags are a Postgres table, a hashing function and a policy about expiry dates. Here is ours, and when we would pay for a product instead.
We added an index to fix a 1.2 second query and the plan did not change. Here is how EXPLAIN ANALYZE told us why, and the partial index that worked.