TECH DEBT TRIBUNALNo Idempotency Keys on Payment API
00:00Senior · ~30 min
📂 src/payments
📄idempotentPayment.ts
📄schema.sqlread-only
idempotentPayment.ts
schema.sql🔒
Loading...
Live Analysis
Cyclomatic ComplexityLIVE
0 / 4 target
Complexity is within acceptable limits.
ObjectivesPENDING
1 / 4
  • Generate a deterministic idempotency key from userId+orderId+amount
  • Check DB for existing idempotency key before charging
  • Pass idempotency key to Stripe in request options
  • Store result in DB after successful charge
Acceptance TestsJest
/ 16
Submit to run acceptance suite.