caelum0x c709b0d3ec feat: harden money-path idempotency across checkout, settlement, and reversal
- Send stable per-checkout Idempotency-Key headers to Creem and Dodo so
  concurrent retries converge on one payable provider session
- State-guarded provider-session persistence: a late provider response can
  no longer clobber a checkout a webhook already settled/reversed
- Key refund/dispute idempotency on the provider adjustment id (not the
  webhook event id) with ON CONFLICT claim, preventing double-subtraction
  when the same refund replays under a new event id
- Surface a conflicting second capture on an already-fulfilled checkout as
  an incident instead of silently swallowing it
- Clamp reversals to the settled contribution so post-dispute refunds are
  zero-delta no-ops instead of jamming the webhook forever
- Unique indexes: (provider, provider_adjustment_id) on payment_adjustments,
  partial (provider, provider_transaction_id) on bids (migration 0024)
- 4 new unit tests + 5 new Postgres integration scenarios (all green vs
  real Postgres 16)
2026-09-05 17:09:23 +03:00
..