{"openapi":"3.1.0","info":{"title":"ARN x402 PayGuard","version":"1.0.0","contact":{"email":"Rajdeep.dutta.in@gmail.com"},"description":"Agent Reliability Network presents ARN x402 PayGuard: payment security for autonomous agents. Check the seller before you pay. Use detailed payment preflight or the simple before-spend security check to verify an x402 seller, validate its payment challenge, and assess counterparty risk before an agent spends funds. Returns ALLOW, CAUTION, or BLOCK.","x-guidance":"Agent Reliability Network provides ARN x402 PayGuard for x402 payment security. Use POST /preflight for detailed seller verification before payment, or POST /before-spend as the simple security check immediately before an autonomous agent spends money on an x402 seller. Send the seller HTTPS URL and optionally a buyer spend ceiling. ARN does not pay the seller."},"tags":[{"name":"Security","description":"Paid agent security for x402 seller verification and counterparty payment risk before payment."},{"name":"x402","description":"x402 payment security, seller verification, and payment-challenge validation."},{"name":"Payments","description":"Payment preflight and before-spend transaction safety for autonomous agents."},{"name":"Reliability","description":"Agent Reliability Network counterparty-risk checks before payment."},{"name":"AI Agents","description":"AI agent payment security for autonomous paid-agent workflows."},{"name":"Discovery","description":"Free machine-readable service documentation."}],"paths":{"/preflight":{"post":{"operationId":"preflight","summary":"ARN x402 PayGuard Detailed Payment Preflight","description":"Agent Reliability Network detailed payment-security inspection for autonomous agents. Provide the seller HTTPS endpoint and optional intended spend ceiling; ARN x402 PayGuard verifies an x402 seller, validates its payment challenge, and assesses counterparty risk before payment. Returns ALLOW, CAUTION, or BLOCK. ARN does not pay the seller.","tags":["Security","x402","Payments","Reliability","AI Agents"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS URL of the x402 seller endpoint to inspect"},"intended_spend_usdc":{"type":"number","exclusiveMinimum":0,"description":"Optional maximum USDC amount the caller intends to authorize"},"authorization":{"type":"object","additionalProperties":false,"description":"Optional unsigned payment authorization context to compare with the live x402 challenge","properties":{"amount_atomic":{"type":"string","pattern":"^[0-9]+$","description":"Atomic token amount the buyer is about to authorize"},"network":{"type":"string","description":"CAIP-2 payment network the buyer is about to authorize"},"asset":{"type":"string","description":"Payment asset the buyer is about to authorize"},"payTo":{"type":"string","description":"Payment recipient the buyer is about to authorize"},"payer":{"type":"string","description":"Optional expected EIP-3009 authorization payer; distinct from a transaction relayer"},"resource":{"type":"string","format":"uri","description":"Seller resource the authorization is intended to purchase"},"valid_after":{"type":["integer","string"],"description":"Optional authorization valid-after Unix timestamp"},"valid_before":{"type":["integer","string"],"description":"Optional authorization expiry Unix timestamp"},"transaction":{"type":"object","additionalProperties":false,"description":"Optional unsigned Base eth_call input reused for transaction simulation and supported canonical USDC authorization decoding","properties":{"from":{"type":"string","description":"Optional EVM caller address for eth_call"},"to":{"type":"string","description":"EVM call target; must match the challenged payment asset"},"data":{"type":"string","pattern":"^0x(?:[0-9a-fA-F]{2})+$","description":"Non-empty hex calldata for the unsigned simulation"},"value":{"type":"string","pattern":"^0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)$","description":"Optional hexadecimal native-value quantity for eth_call"}}}}}},"required":["url"],"additionalProperties":false},"example":{"url":"https://paid-agent.example/api","intended_spend_usdc":0.03}}}},"responses":{"200":{"description":"Successful preflight security result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"decision":{"type":"string","enum":["ALLOW","CAUTION","BLOCK"]},"reason_codes":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["HTTPS_REQUIRED","INVALID_URL","SELLER_UNREACHABLE","SELLER_TIMEOUT","UNSAFE_REDIRECT","UNSAFE_REDIRECT_CREDENTIALS","HTTPS_DOWNGRADE","REDIRECT_LOOP","EXCESSIVE_REDIRECTS","EXPECTED_402","INVALID_X402_CHALLENGE","UNSUPPORTED_X402_VERSION","UNSUPPORTED_PAYMENT_SCHEME","NETWORK_MISMATCH","DUPLICATE_PAYMENT_REQUIREMENTS","CONFLICTING_PAYMENT_REQUIREMENTS","AMBIGUOUS_PAYMENT_OPTIONS","INVALID_PAYMENT_ASSET","NON_CANONICAL_USDC","INVALID_PAY_TO","UNSAFE_RECEIVER","RECIPIENT_RPC_UNAVAILABLE","INVALID_PAYMENT_REQUIREMENT","INVALID_PAYMENT_TIMEOUT","RESOURCE_BINDING_MISMATCH","INVALID_CONTENT_TYPE","RESPONSE_TOO_LARGE","MALFORMED_JSON","INVALID_RESPONSE_SCHEMA","NETWORK_CHANGED","ASSET_CHANGED","PAY_TO_CHANGED","PRICE_CHANGED","PAYMENT_REQUIREMENTS_MUTATED","PAYMENT_CHALLENGE_BODY_MISMATCH","INVALID_INTENDED_SPEND","PRICE_EXCEEDS_INTENT","AUTH_AMOUNT_MISMATCH","AUTH_ASSET_MISMATCH","AUTH_NETWORK_MISMATCH","AUTH_RECIPIENT_MISMATCH","CALLDATA_PAYER_MISMATCH","AUTH_RESOURCE_MISMATCH","AUTH_WINDOW_UNSAFE","TRANSACTION_SIMULATION_REVERTED","TRANSACTION_SIMULATION_RPC_UNAVAILABLE","SAFE_REDIRECT_FOLLOWED"]}},"checks":{"type":"object","additionalProperties":false,"properties":{"https":{"type":"boolean"},"reachable":{"type":"boolean"},"no_unsafe_redirect":{"type":"boolean"},"http_402":{"type":"boolean"},"x402_valid":{"type":"boolean"},"x402_v2":{"type":"boolean"},"exact_payment":{"type":"boolean"},"supported_network":{"type":"boolean"},"asset_address_valid":{"type":"boolean"},"canonical_usdc":{"type":"boolean"},"pay_to_address_valid":{"type":"boolean"},"pay_to_safe_receiver":{"type":"boolean"},"positive_amount":{"type":"boolean"},"reasonable_timeout":{"type":"boolean"},"resource_binding":{"type":"boolean"},"response_size_within_limit":{"type":"boolean"},"content_type_sane":{"type":"boolean"},"structured_response_sane":{"type":"boolean"},"challenge_stable":{"type":"boolean"},"within_intended_spend":{"type":["boolean","null"]}},"required":["https","reachable","no_unsafe_redirect","http_402","x402_valid","x402_v2","exact_payment","supported_network","asset_address_valid","canonical_usdc","pay_to_address_valid","pay_to_safe_receiver","positive_amount","reasonable_timeout","resource_binding","response_size_within_limit","content_type_sane","structured_response_sane","challenge_stable","within_intended_spend"]},"warnings":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","enum":["HTTPS_REQUIRED","INVALID_URL","SELLER_UNREACHABLE","SELLER_TIMEOUT","UNSAFE_REDIRECT","UNSAFE_REDIRECT_CREDENTIALS","HTTPS_DOWNGRADE","REDIRECT_LOOP","EXCESSIVE_REDIRECTS","EXPECTED_402","INVALID_X402_CHALLENGE","UNSUPPORTED_X402_VERSION","UNSUPPORTED_PAYMENT_SCHEME","NETWORK_MISMATCH","DUPLICATE_PAYMENT_REQUIREMENTS","CONFLICTING_PAYMENT_REQUIREMENTS","AMBIGUOUS_PAYMENT_OPTIONS","INVALID_PAYMENT_ASSET","NON_CANONICAL_USDC","INVALID_PAY_TO","UNSAFE_RECEIVER","RECIPIENT_RPC_UNAVAILABLE","INVALID_PAYMENT_REQUIREMENT","INVALID_PAYMENT_TIMEOUT","RESOURCE_BINDING_MISMATCH","INVALID_CONTENT_TYPE","RESPONSE_TOO_LARGE","MALFORMED_JSON","INVALID_RESPONSE_SCHEMA","NETWORK_CHANGED","ASSET_CHANGED","PAY_TO_CHANGED","PRICE_CHANGED","PAYMENT_REQUIREMENTS_MUTATED","PAYMENT_CHALLENGE_BODY_MISMATCH","INVALID_INTENDED_SPEND","PRICE_EXCEEDS_INTENT","AUTH_AMOUNT_MISMATCH","AUTH_ASSET_MISMATCH","AUTH_NETWORK_MISMATCH","AUTH_RECIPIENT_MISMATCH","CALLDATA_PAYER_MISMATCH","AUTH_RESOURCE_MISMATCH","AUTH_WINDOW_UNSAFE","TRANSACTION_SIMULATION_REVERTED","TRANSACTION_SIMULATION_RPC_UNAVAILABLE","SAFE_REDIRECT_FOLLOWED"]},"message":{"type":"string"}},"required":["code","message"]}},"errors":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","enum":["HTTPS_REQUIRED","INVALID_URL","SELLER_UNREACHABLE","SELLER_TIMEOUT","UNSAFE_REDIRECT","UNSAFE_REDIRECT_CREDENTIALS","HTTPS_DOWNGRADE","REDIRECT_LOOP","EXCESSIVE_REDIRECTS","EXPECTED_402","INVALID_X402_CHALLENGE","UNSUPPORTED_X402_VERSION","UNSUPPORTED_PAYMENT_SCHEME","NETWORK_MISMATCH","DUPLICATE_PAYMENT_REQUIREMENTS","CONFLICTING_PAYMENT_REQUIREMENTS","AMBIGUOUS_PAYMENT_OPTIONS","INVALID_PAYMENT_ASSET","NON_CANONICAL_USDC","INVALID_PAY_TO","UNSAFE_RECEIVER","RECIPIENT_RPC_UNAVAILABLE","INVALID_PAYMENT_REQUIREMENT","INVALID_PAYMENT_TIMEOUT","RESOURCE_BINDING_MISMATCH","INVALID_CONTENT_TYPE","RESPONSE_TOO_LARGE","MALFORMED_JSON","INVALID_RESPONSE_SCHEMA","NETWORK_CHANGED","ASSET_CHANGED","PAY_TO_CHANGED","PRICE_CHANGED","PAYMENT_REQUIREMENTS_MUTATED","PAYMENT_CHALLENGE_BODY_MISMATCH","INVALID_INTENDED_SPEND","PRICE_EXCEEDS_INTENT","AUTH_AMOUNT_MISMATCH","AUTH_ASSET_MISMATCH","AUTH_NETWORK_MISMATCH","AUTH_RECIPIENT_MISMATCH","CALLDATA_PAYER_MISMATCH","AUTH_RESOURCE_MISMATCH","AUTH_WINDOW_UNSAFE","TRANSACTION_SIMULATION_REVERTED","TRANSACTION_SIMULATION_RPC_UNAVAILABLE","SAFE_REDIRECT_FOLLOWED"]},"message":{"type":"string"}},"required":["code","message"]}},"reachable":{"type":"boolean"},"payment_required":{"type":"boolean"},"x402_valid":{"type":"boolean"},"x402_version":{"type":["integer","null"],"enum":[2,null]},"scheme":{"type":["string","null"],"enum":["exact",null]},"network":{"type":["string","null"]},"asset":{"type":["string","null"]},"payTo":{"type":["string","null"]},"quoted_price_atomic":{"type":["string","null"]},"quoted_price_usdc":{"type":["number","null"]},"intended_spend_usdc":{"type":["number","null"]},"authorization":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["VERIFIED","MISMATCH","UNAVAILABLE"]},"mechanism":{"type":["string","null"]}},"required":["status","mechanism"]},"simulation":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["SUCCESS","REVERTED","UNAVAILABLE","UNKNOWN"]},"failure":{"type":["string","null"]}},"required":["status","failure"]},"latency_ms":{"type":"integer","minimum":0},"methodology":{"type":"string","const":"live-security-v1"}},"required":["decision","reason_codes","checks","warnings","errors","reachable","payment_required","x402_valid","x402_version","scheme","network","asset","payTo","quoted_price_atomic","quoted_price_usdc","intended_spend_usdc","authorization","simulation","latency_ms","methodology"]}}}},"400":{"description":"Request validation failed after payment processing.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"x402 payment challenge for the $0.001 USDC ARN preflight."}}}},"/before-spend":{"post":{"operationId":"beforeSpend","summary":"ARN x402 PayGuard Before-Spend Security Check","description":"Security check immediately before an autonomous agent spends money on an x402 seller. Agent Reliability Network positions ARN x402 PayGuard as the flagship simple integration for x402 payment security, seller verification, payment-challenge validation, and transaction safety. ARN does not pay the seller.","tags":["Security","x402","Payments","Reliability","AI Agents"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS URL of the x402 seller endpoint to inspect"},"intended_spend_usdc":{"type":"number","exclusiveMinimum":0,"description":"Optional maximum USDC amount the caller intends to authorize"},"authorization":{"type":"object","additionalProperties":false,"description":"Optional unsigned payment authorization context to compare with the live x402 challenge","properties":{"amount_atomic":{"type":"string","pattern":"^[0-9]+$","description":"Atomic token amount the buyer is about to authorize"},"network":{"type":"string","description":"CAIP-2 payment network the buyer is about to authorize"},"asset":{"type":"string","description":"Payment asset the buyer is about to authorize"},"payTo":{"type":"string","description":"Payment recipient the buyer is about to authorize"},"payer":{"type":"string","description":"Optional expected EIP-3009 authorization payer; distinct from a transaction relayer"},"resource":{"type":"string","format":"uri","description":"Seller resource the authorization is intended to purchase"},"valid_after":{"type":["integer","string"],"description":"Optional authorization valid-after Unix timestamp"},"valid_before":{"type":["integer","string"],"description":"Optional authorization expiry Unix timestamp"},"transaction":{"type":"object","additionalProperties":false,"description":"Optional unsigned Base eth_call input reused for transaction simulation and supported canonical USDC authorization decoding","properties":{"from":{"type":"string","description":"Optional EVM caller address for eth_call"},"to":{"type":"string","description":"EVM call target; must match the challenged payment asset"},"data":{"type":"string","pattern":"^0x(?:[0-9a-fA-F]{2})+$","description":"Non-empty hex calldata for the unsigned simulation"},"value":{"type":"string","pattern":"^0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)$","description":"Optional hexadecimal native-value quantity for eth_call"}}}}}},"required":["url"],"additionalProperties":false},"example":{"url":"https://paid-agent.example/api","intended_spend_usdc":0.03}}}},"responses":{"200":{"description":"Compact deterministic before-spend security decision","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"decision":{"type":"string","enum":["ALLOW","CAUTION","BLOCK"]},"reason_codes":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["HTTPS_REQUIRED","INVALID_URL","SELLER_UNREACHABLE","SELLER_TIMEOUT","UNSAFE_REDIRECT","UNSAFE_REDIRECT_CREDENTIALS","HTTPS_DOWNGRADE","REDIRECT_LOOP","EXCESSIVE_REDIRECTS","EXPECTED_402","INVALID_X402_CHALLENGE","UNSUPPORTED_X402_VERSION","UNSUPPORTED_PAYMENT_SCHEME","NETWORK_MISMATCH","DUPLICATE_PAYMENT_REQUIREMENTS","CONFLICTING_PAYMENT_REQUIREMENTS","AMBIGUOUS_PAYMENT_OPTIONS","INVALID_PAYMENT_ASSET","NON_CANONICAL_USDC","INVALID_PAY_TO","UNSAFE_RECEIVER","RECIPIENT_RPC_UNAVAILABLE","INVALID_PAYMENT_REQUIREMENT","INVALID_PAYMENT_TIMEOUT","RESOURCE_BINDING_MISMATCH","INVALID_CONTENT_TYPE","RESPONSE_TOO_LARGE","MALFORMED_JSON","INVALID_RESPONSE_SCHEMA","NETWORK_CHANGED","ASSET_CHANGED","PAY_TO_CHANGED","PRICE_CHANGED","PAYMENT_REQUIREMENTS_MUTATED","PAYMENT_CHALLENGE_BODY_MISMATCH","INVALID_INTENDED_SPEND","PRICE_EXCEEDS_INTENT","AUTH_AMOUNT_MISMATCH","AUTH_ASSET_MISMATCH","AUTH_NETWORK_MISMATCH","AUTH_RECIPIENT_MISMATCH","CALLDATA_PAYER_MISMATCH","AUTH_RESOURCE_MISMATCH","AUTH_WINDOW_UNSAFE","TRANSACTION_SIMULATION_REVERTED","TRANSACTION_SIMULATION_RPC_UNAVAILABLE","SAFE_REDIRECT_FOLLOWED"]}},"checks":{"type":"object","additionalProperties":false,"properties":{"https":{"type":"boolean"},"reachable":{"type":"boolean"},"no_unsafe_redirect":{"type":"boolean"},"http_402":{"type":"boolean"},"x402_valid":{"type":"boolean"},"x402_v2":{"type":"boolean"},"exact_payment":{"type":"boolean"},"supported_network":{"type":"boolean"},"canonical_usdc":{"type":"boolean"},"pay_to_safe_receiver":{"type":"boolean"},"positive_amount":{"type":"boolean"},"resource_binding":{"type":"boolean"},"challenge_stable":{"type":"boolean"},"within_intended_spend":{"type":["boolean","null"]}},"required":["https","reachable","no_unsafe_redirect","http_402","x402_valid","x402_v2","exact_payment","supported_network","canonical_usdc","pay_to_safe_receiver","positive_amount","resource_binding","challenge_stable","within_intended_spend"]},"quoted_payment":{"type":"object","additionalProperties":false,"properties":{"network":{"type":["string","null"]},"asset":{"type":["string","null"]},"payTo":{"type":["string","null"]},"amount_atomic":{"type":["string","null"]},"amount_usdc":{"type":["number","null"]},"recipient_type":{"type":"string","enum":["EOA","CONTRACT","UNKNOWN","NOT_INSPECTED"]}},"required":["network","asset","payTo","amount_atomic","amount_usdc","recipient_type"]},"intended_spend_usdc":{"type":["number","null"]},"authorization":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["VERIFIED","MISMATCH","UNAVAILABLE"]},"mechanism":{"type":["string","null"]}},"required":["status","mechanism"]},"simulation":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["SUCCESS","REVERTED","UNAVAILABLE","UNKNOWN"]},"failure":{"type":["string","null"]}},"required":["status","failure"]},"latency_ms":{"type":"integer","minimum":0},"methodology":{"type":"string","const":"live-security-v1"}},"required":["decision","reason_codes","checks","quoted_payment","intended_spend_usdc","authorization","simulation","latency_ms","methodology"]}}}},"400":{"description":"Request validation failed after payment processing.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"x402 payment challenge for the $0.001 USDC ARN before-spend security check."}}}},"/health":{"get":{"summary":"Read service health and deployment network","description":"Free machine-readable health response for ARN.","tags":["Discovery"],"security":[],"responses":{"200":{"description":"Service health response"}}}},"/capabilities":{"get":{"summary":"Read stable ARN product capabilities","description":"Free machine-readable summary of the paid preflight service.","tags":["Discovery"],"security":[],"responses":{"200":{"description":"Stable capability summary"}}}},"/llms.txt":{"get":{"summary":"Read compact AI-agent integration guidance","description":"Free plain-text guide for AI agents using ARN.","tags":["Discovery","AI"],"security":[],"responses":{"200":{"description":"AI-agent guidance"}}}},"/.well-known/x402-service.json":{"get":{"summary":"Read the ARN x402 service manifest","description":"Free machine manifest for the production paid preflight.","tags":["Discovery","Security","Crypto","Payments","x402"],"security":[],"responses":{"200":{"description":"x402 service manifest"}}}},"/robots.txt":{"get":{"summary":"Read crawler directives","description":"Free robots directives for ARN public discovery.","tags":["Discovery"],"security":[],"responses":{"200":{"description":"Robots directives"}}}},"/sitemap.xml":{"get":{"summary":"Read the public ARN sitemap","description":"Free sitemap containing only public discovery surfaces.","tags":["Discovery"],"security":[],"responses":{"200":{"description":"Public sitemap"}}}}}}