check_payment_replay
Detect and block duplicate x402 payments by checking if the exact payment was recently seen before submission. Records fingerprint once to prevent replays.
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. prior_decision_refs: Optional decision_ref values this server returned earlier for the same payment; linked into the signed record. Max 8.
Returns: {"is_replay": false, "fingerprint": ""} on first seen, or {"is_replay": true, "fingerprint": ""} on duplicate; plus decision_ref when signed decision evidence is enabled.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resource_url": "<resource_url>",
"pay_to": "<pay_to>",
"amount": "<amount>",
"currency": "<currency>",
"deadline_seconds": "<deadline_seconds>"
},
"name": "check_payment_replay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| pay_to | Yes | ||
| currency | Yes | ||
| resource_url | Yes | ||
| deadline_seconds | Yes | ||
| prior_decision_refs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||