A replay attack is when an attacker captures a legitimate request or message and sends it again later to make a system repeat the same action. In payment and authentication flows, that can mean duplicate charges, repeated API calls, or access being granted more than once from a single valid authorization.
Replay attacks matter because the replayed message often looks authentic: it may contain a valid signature, token, or payment proof. Defenses rely on freshness checks such as nonces, timestamps, one-time tokens, short-lived credentials, and server-side state that rejects duplicates. In machine-payment systems, replay resistance is critical because a valid payment challenge or authorization header should not be usable twice. Strong idempotency controls and audit logging help ensure each microtransaction is processed only once.


