Replay-Risk Checks for a Paid x402 Verification Request
Paid verification flows combine two questions in one exchange: what did the tool return, and what does the chain show? Replay risk appears when a retry, timeout or duplicate log entry lets those questions collapse into a single status flag. Using Skavio x402 MCP as the reference product, this guide sets out a practical sequence for checking a paid on-chain verification request without treating a 402 challenge or a signed challenge as settled payment.
Discovery and payment are different events
An MCP client can discover a tool without invoking it. Skavio describes tool discovery and payment as distinct actions, so the integration should record them as distinct events. A discovery response can help a client identify available tooling; it is not evidence that a paid verification ran. Build logs around intent: what the client asked to do, against which tool, and under which request identifier. Read the published documentation for the exact tool schema before mapping fields.
- Log discovery as its own event, separate from a paid tool call.
- Do not reuse a discovery response as proof of invocation, payment or result quality.
- Confirm the current MCP tool schema and documented network and wallet requirements in the docs.
Give every payment attempt a stable internal request ID
Replay risk grows when a client retries after a timeout but cannot tell whether the first attempt reached the server. Generate an internal request ID before the first call and reuse it only for the same intent. Store the mapping between that ID, the MCP tool call, the x402 challenge and any published chain reference. Treat a new business intent as a new ID. Do not assume the platform enforces duplicate suppression on your identifier; verify any nonce, idempotency or replay controls in the current documentation.
- Create the ID client-side before the first paid attempt; keep it stable across network retries for the same intent.
- Map the ID to tool name, request parameters, challenge reference and result reference without storing private keys or raw wallet secrets.
- Check the docs for supported idempotency semantics, duplicate-request handling and whether replayed challenges are rejected.
A 402 challenge is a condition, not a receipt
An x402 402 response tells the client what payment condition is being requested. A signed payment challenge can be evidence of a step in the payment flow, but Skavio explicitly frames it as not independently settled revenue. Log the challenge as conditional evidence and compare it with the original tool request. If the challenge expires, the network does not match the documented requirement, or the amount or recipient differs, stop and reconcile. Do not turn a challenge signature into a completed job status.
- Record challenge terms from the documented response fields and compare them with the requested tool and parameters.
- Treat a signed challenge as conditional; do not mark the task paid, complete or booked.
- On expiry or mismatch, start a fresh request with a new internal ID rather than replaying old material blindly.
- Confirm exact expiry, network and verification behavior in the x402 MCP documentation.
Reconcile chain verification and API delivery on separate tracks
Skavio describes Skavio x402 MCP as developer-facing MCP and x402 v2 verification for native Circle USDC, public chain inspection and conditional Base USDC payment challenges. That description gives the integration two evidence streams: the response from the MCP tool call, and the chain observation from public inspection. Neither stream automatically proves the other. A successful MCP tool response does not by itself prove settlement; a transfer observation does not by itself prove that the requested verification result was correct. Keep separate records, then reconcile.
- Store the MCP response, any result reference and error state separately from payment evidence.
- When checking chain evidence, verify the documented network, token, amount and recipient details before drawing a conclusion.
- If verification is pending, inconsistent or unavailable, emit a structured uncertainty state and route the case to review; never invent a transfer confirmation.
- Use the current documentation to determine which settlement or verification states the product actually exposes.