Source code Security & compliance Stability

Missing idempotency

Part of the Payment safety check · fix arrives as a guide

What it is

A charge, subscription change, or refund is created without an idempotency key.

Why it matters

Networks retry and users double-click. Without a key, the second identical request creates a second charge, and the customer is billed twice for one intent.

How to fix it

Generate a stable key per logical operation — derived from your own order id, not from a timestamp — and pass it on every mutating call. Store it so a retry after a crash reuses the same key.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.