check_payment_replay
Detect duplicate payments before submission by checking if the exact payment fingerprint has been recorded recently, preventing replay attacks.
Instructions
Check whether this exact payment has been seen recently (replay protection).
WARNING: this records the fingerprint. Call exactly once, immediately before submitting the payment.
Cross-process detection requires PRESIDIO_X402_FINGERPRINT_KEY (and optionally PRESIDIO_X402_MCP_REDIS_URL); otherwise each MCP server process has its own ephemeral in-memory store.
Args: resource_url: x402 resource URL. pay_to: Recipient address. amount: Amount as string (preserves precision). currency: Currency symbol (e.g. "USDC"). deadline_seconds: Payment deadline as epoch seconds.
Returns: {"is_replay": false, "fingerprint": ""} on first seen, or {"is_replay": true, "fingerprint": ""} on duplicate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| pay_to | Yes | ||
| currency | Yes | ||
| resource_url | Yes | ||
| deadline_seconds | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||