{"openapi":"3.1.0","info":{"title":"Clash of Coins API","version":"1.0.0","summary":"Agentic checkout for Clash of Coins","description":"Agentic checkout for Clash of Coins","guidance":"Use /agentic/* for presale NFT checkout and /shop/* protocol routes for game shop purchases. Read the route-specific offers endpoint first, then quote or buy using the same recipient and payment protocol.","x-guidance":"Use /agentic/* for presale NFT checkout and /shop/* protocol routes for game shop purchases. Read the route-specific offers endpoint first, then quote or buy using the same recipient and payment protocol.","x-error-recovery":"For 402, preserve the request body and retry with the payment header. For 429, respect Retry-After. For 5xx, retry status/read calls with bounded exponential backoff before creating duplicate payments."},"x-discovery":{"ownershipProofs":["9a10bc6c98df8bd724e1fa8a89faadd09dc1bfcc81950087165da434778a9155"]},"servers":[{"url":"https://x402.clashofcoins.com","description":"Agentic checkout for Clash of Coins"}],"tags":[{"name":"catalog","description":"Aggregated catalog index for sale and shop items"},{"name":"Gaming","description":"Clash of Coins gaming commerce endpoints"},{"name":"x402","description":"Canonical x402 purchase flow"},{"name":"shop","description":"Clash of Coins game shop checkout"},{"name":"agent-wallet","description":"Dedicated onchain agent wallet checkout flow"},{"name":"webhooks","description":"Documented checkout lifecycle event shapes"}],"paths":{"/mcp.json":{"get":{"operationId":"getMcpJson","tags":["discovery"],"summary":"Return MCP connection instructions for the Clash of Coins service","description":"Use this manifest to discover the service stdio MCP server, installation command, Cursor config path, and exposed tools, resources, and prompts.","responses":{"200":{"description":"MCP manifest for local Cursor and terminal clients"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/skills/index.json":{"get":{"operationId":"getSkillsIndexJson","tags":["discovery"],"summary":"Return the published skills index for Clash of Coins","description":"Lists live and published skills, recommended entrypoint aliases, and bundle metadata (references/scripts/evals/openai config) for reusable agent onboarding.","responses":{"200":{"description":"Published skills index"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/.well-known/skills/index.json":{"get":{"operationId":"getWellKnownSkillsIndexJson","tags":["discovery"],"summary":"Return a .well-known alias of the published skills index","description":"Compatibility alias for Agent Skills consumers that probe /.well-known/skills/index.json before custom skill index routes.","responses":{"200":{"description":"Published skills index (.well-known alias)"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/catalog":{"get":{"operationId":"getCatalog","tags":["catalog"],"summary":"Return the aggregated Clash of Coins catalog","description":"Read sale and shop items in one response without losing the underlying checkout surface. Shop items may be read anonymously or personalized with exactly one recipient identifier.","parameters":[{"name":"nickname","in":"query","required":false,"schema":{"type":"string"},"description":"Optional player nickname for a personalized shop catalog. Do not send together with address."},{"name":"address","in":"query","required":false,"schema":{"type":"string"},"description":"Optional EVM address for a personalized shop catalog. Do not send together with nickname."}],"responses":{"200":{"description":"Aggregated catalog index across sale and shop","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer"},"service":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"docs":{"type":"string"}}},"scope":{"type":"object","properties":{"mode":{"type":"string"},"shopCatalogMode":{"type":"string"},"recipient":{"anyOf":[{"type":"null"},{"type":"object","properties":{"nickname":{"type":["string","null"]},"address":{"type":["string","null"]}}}]}}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"sale":{"type":"integer"},"shop":{"type":"integer"}}},"items":{"type":"array","items":{"type":"object","properties":{"catalogId":{"type":"string"},"surface":{"type":"string","enum":["sale","shop"]},"surfaceItemId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"priceUsd":{"type":"string"},"purchaseUrl":{"type":["string","null"]},"checkout":{"type":"object","properties":{"preferredProtocol":{"type":["string","null"]},"requiresRecipient":{"type":"boolean"},"requiresBeneficiary":{"type":"boolean"},"protocols":{"type":"object"}}}}}}}}}}},"400":{"description":"Invalid recipient scope","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agent-wallet/orders/quote":{"post":{"operationId":"postAgentWalletOrdersQuote","tags":["agent-wallet"],"summary":"Quote agent-wallet order amount","description":"Resolves sale/shop purchase intent into a normalized agent-wallet order quote without charging payment. `protocol` is optional; when omitted the service chooses a compatible enabled protocol for that intent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Order intent payload (surface, protocol, and purchase input) matching the active sale/shop checkout contract."}}}},"responses":{"200":{"description":"Quoted order payload for agent-wallet funding"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agent-wallet/orders":{"post":{"operationId":"postAgentWalletOrders","tags":["agent-wallet"],"summary":"Create agent-wallet order","description":"Creates an order bound to the dedicated agent wallet and returns the active funding endpoint. This is the first step of the simplified flow: create order -> pay funding route -> service auto-completes sweep/finalize. `protocol` is optional and can be inferred by the service when omitted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Idempotent replay of existing order"},"201":{"description":"Order created"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agent-wallet/orders/{orderId}":{"get":{"operationId":"getAgentWalletOrdersOrderId","tags":["agent-wallet"],"summary":"Read agent-wallet order state","description":"Returns current order status, funding/sweep references, and recorded wallet movements. SIWX identity may be required by deployment policy.","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order found"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Order not found","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agent-wallet/orders/{orderId}/execute-sweep":{"post":{"operationId":"postAgentWalletOrdersOrderIdExecuteSweep","tags":["agent-wallet"],"summary":"Execute agent-wallet treasury sweep","description":"Manual recovery route: agent wallet transfers the quoted amount to treasury and records agent->treasury movement when auto-execution is disabled or needs retry.","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sweep submitted and recorded"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"401":{"description":"SIWA session required when enabled"},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"409":{"description":"Order is not sweepable"},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agent-wallet/orders/{orderId}/finalize":{"post":{"operationId":"postAgentWalletOrdersOrderIdFinalize","tags":["agent-wallet"],"summary":"Finalize agent-wallet order and execute purchase logic","description":"Manual recovery route: after treasury sweep, triggers existing sale mint or shop delivery flow and records purchase linkage when auto-execution is disabled or needs retry.","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order finalized"},"202":{"description":"Order finalized with pending fulfillment"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"401":{"description":"SIWA session required when enabled"},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"409":{"description":"Order is not finalizable"},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agent-wallet/x402/fund":{"post":{"operationId":"fundAgentWalletOrder","tags":["Gaming","agent-wallet","x402"],"summary":"Fund an agent-wallet order through X402","description":"Pays the dedicated onchain agent wallet via the canonical x402 funding route. Create the order first, then submit paid funding for that orderId. Unpaid discovery probes may send an empty JSON body to receive a canonical payment challenge, but real funding and paid retries must include orderId. By default, the service auto-executes treasury sweep and purchase finalization after successful funding.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["orderId"],"properties":{"orderId":{"type":"string","description":"Agent wallet order id returned by POST /agent-wallet/orders"}},"additionalProperties":false},"example":{"orderId":"aw-ord-1"}}}},"responses":{"200":{"description":"Order funded and auto-processed (sweep + finalize) successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"paymentReference":{"type":"string"},"order":{"type":"object","properties":{"orderId":{"type":"string"},"mode":{"type":["string","null"]},"surface":{"type":["string","null"]},"protocol":{"type":["string","null"]},"status":{"type":["string","null"]},"amountUsd":{"type":["string","null"]},"amountAtomic":{"type":["string","null"]},"currency":{"type":["string","null"]},"network":{"type":["string","null"]},"fundingPaymentReference":{"type":["string","null"]},"userToAgentTxHash":{"type":["string","null"]},"agentToTreasuryTxHash":{"type":["string","null"]},"linkedPurchaseReference":{"type":["string","null"]},"userAddress":{"type":["string","null"]},"recipientNickname":{"type":["string","null"]},"recipientAddress":{"type":["string","null"]},"beneficiaryAddress":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}}},"autoExecution":{"type":"object","properties":{"attempted":{"type":"boolean"},"enabled":{"type":"boolean"},"success":{"type":"boolean"},"error":{"type":["string","null"]},"sweepTxHash":{"type":["string","null"]},"linkedPurchaseReference":{"type":["string","null"]},"recovery":{"type":"object","properties":{"sweepEndpoint":{"type":"string"},"finalizeEndpoint":{"type":"string"}}},"completion":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}}},"error":{"type":"string"},"paymentRetry":{"type":"object","additionalProperties":true},"mpp":{"type":"object","additionalProperties":true}},"additionalProperties":true},"example":{"status":"purchase_recorded","paymentReference":"0x1111111111111111111111111111111111111111111111111111111111111111","order":{"orderId":"aw-ord-1","mode":"agent_wallet_x402_funded","surface":"sale","protocol":"x402","status":"purchase_recorded","amountUsd":"900.000000","amountAtomic":"900000","currency":"USDC","network":"eip155:8453","fundingPaymentReference":"0x1111111111111111111111111111111111111111111111111111111111111111","userToAgentTxHash":"0x1111111111111111111111111111111111111111111111111111111111111111","agentToTreasuryTxHash":"0x2222222222222222222222222222222222222222222222222222222222222222","linkedPurchaseReference":"0x3333333333333333333333333333333333333333333333333333333333333333","userAddress":"0x4444444444444444444444444444444444444444","recipientNickname":null,"recipientAddress":null,"beneficiaryAddress":"0x5555555555555555555555555555555555555555","createdAt":"2026-04-20T10:00:00.000Z","updatedAt":"2026-04-20T10:00:05.000Z"},"autoExecution":{"attempted":true,"success":true,"sweepTxHash":"0x2222222222222222222222222222222222222222222222222222222222222222","linkedPurchaseReference":"0x3333333333333333333333333333333333333333333333333333333333333333","completion":{"status":"submitted"}}}}}},"202":{"description":"Funding settled, but auto-processing requires retry or manual recovery via sweep/finalize endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"paymentReference":{"type":"string"},"order":{"type":"object","properties":{"orderId":{"type":"string"},"mode":{"type":["string","null"]},"surface":{"type":["string","null"]},"protocol":{"type":["string","null"]},"status":{"type":["string","null"]},"amountUsd":{"type":["string","null"]},"amountAtomic":{"type":["string","null"]},"currency":{"type":["string","null"]},"network":{"type":["string","null"]},"fundingPaymentReference":{"type":["string","null"]},"userToAgentTxHash":{"type":["string","null"]},"agentToTreasuryTxHash":{"type":["string","null"]},"linkedPurchaseReference":{"type":["string","null"]},"userAddress":{"type":["string","null"]},"recipientNickname":{"type":["string","null"]},"recipientAddress":{"type":["string","null"]},"beneficiaryAddress":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}}},"autoExecution":{"type":"object","properties":{"attempted":{"type":"boolean"},"enabled":{"type":"boolean"},"success":{"type":"boolean"},"error":{"type":["string","null"]},"sweepTxHash":{"type":["string","null"]},"linkedPurchaseReference":{"type":["string","null"]},"recovery":{"type":"object","properties":{"sweepEndpoint":{"type":"string"},"finalizeEndpoint":{"type":"string"}}},"completion":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}}},"error":{"type":"string"},"paymentRetry":{"type":"object","additionalProperties":true},"mpp":{"type":"object","additionalProperties":true}},"additionalProperties":true},"example":{"status":"failed","paymentReference":"0x1111111111111111111111111111111111111111111111111111111111111111","order":{"orderId":"aw-ord-1","mode":"agent_wallet_x402_funded","surface":"sale","protocol":"x402","status":"failed","amountUsd":"900.000000","amountAtomic":"900000","currency":"USDC","network":"eip155:8453","fundingPaymentReference":"0x1111111111111111111111111111111111111111111111111111111111111111","userToAgentTxHash":"0x1111111111111111111111111111111111111111111111111111111111111111","agentToTreasuryTxHash":null,"linkedPurchaseReference":null,"userAddress":"0x4444444444444444444444444444444444444444","recipientNickname":null,"recipientAddress":null,"beneficiaryAddress":"0x5555555555555555555555555555555555555555","createdAt":"2026-04-20T10:00:00.000Z","updatedAt":"2026-04-20T10:00:09.000Z"},"autoExecution":{"attempted":true,"success":false,"error":"auto_execution_failed","recovery":{"sweepEndpoint":"/agent-wallet/orders/aw-ord-1/execute-sweep","finalizeEndpoint":"/agent-wallet/orders/aw-ord-1/finalize"}}}}}},"400":{"description":"Missing orderId on a paid retry or malformed funding request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"additionalProperties":true},"example":{"error":"orderId is required"}}},"headers":{}},"402":{"description":"x402 payment challenge. Retry the same JSON body with PAYMENT-SIGNATURE after settlement.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"paymentReference":{"type":"string"},"order":{"type":"object","properties":{"orderId":{"type":"string"},"mode":{"type":["string","null"]},"surface":{"type":["string","null"]},"protocol":{"type":["string","null"]},"status":{"type":["string","null"]},"amountUsd":{"type":["string","null"]},"amountAtomic":{"type":["string","null"]},"currency":{"type":["string","null"]},"network":{"type":["string","null"]},"fundingPaymentReference":{"type":["string","null"]},"userToAgentTxHash":{"type":["string","null"]},"agentToTreasuryTxHash":{"type":["string","null"]},"linkedPurchaseReference":{"type":["string","null"]},"userAddress":{"type":["string","null"]},"recipientNickname":{"type":["string","null"]},"recipientAddress":{"type":["string","null"]},"beneficiaryAddress":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}}},"autoExecution":{"type":"object","properties":{"attempted":{"type":"boolean"},"enabled":{"type":"boolean"},"success":{"type":"boolean"},"error":{"type":["string","null"]},"sweepTxHash":{"type":["string","null"]},"linkedPurchaseReference":{"type":["string","null"]},"recovery":{"type":"object","properties":{"sweepEndpoint":{"type":"string"},"finalizeEndpoint":{"type":"string"}}},"completion":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}}},"error":{"type":"string"},"paymentRetry":{"type":"object","additionalProperties":true},"mpp":{"type":"object","additionalProperties":true}},"additionalProperties":true},"example":{"error":"payment_required","paymentRetry":{"header":"PAYMENT-SIGNATURE","preserveRequestBody":true,"requiredPaymentPayloadFields":["resource","accepted"]}}}},"headers":{"PAYMENT-REQUIRED":{"description":"Semantic challenge header for unpaid purchase requests.","schema":{"type":"string"}},"WWW-Authenticate":{"description":"Bearer/OAuth metadata hint for protected resource discovery.","schema":{"type":"string"}},"PAYMENT-SIGNATURE":{"description":"Header name used by x402 clients when retrying a paid request.","schema":{"type":"string"}},"PAYMENT-RESPONSE":{"description":"Payment settlement response details when facilitator returns them.","schema":{"type":"string"}}}},"404":{"description":"Order not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"additionalProperties":true},"example":{"error":"Order not found"}}},"headers":{}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"9.000000","max":"900.000000"},"protocols":[{"x402":{"network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25"}}],"authMode":"paid","retryHeader":"PAYMENT-SIGNATURE","payTo":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25","quoteOptional":false,"checkoutFlow":["POST /agent-wallet/orders","/agent-wallet/x402/fund"]}}},"/agent-wallet/x402/purchases/{paymentReference}":{"get":{"operationId":"getAgentWalletX402PurchasesPaymentReference","tags":["agent-wallet","x402"],"summary":"Read agent-wallet funding status","description":"Reads funding status by X402 payment reference for agent-wallet orders. SIWX identity may be required by deployment policy.","parameters":[{"name":"paymentReference","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Funding status found"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Funding payment not found","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/x402/offers":{"get":{"operationId":"getAgenticX402Offers","tags":["x402"],"summary":"List active sale offers","responses":{"200":{"description":"Active catalog entries"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/x402/quote":{"get":{"operationId":"getAgenticX402Quote","tags":["x402"],"summary":"Get payment quote for a sale","parameters":[{"name":"saleId","in":"query","required":true,"schema":{"type":"integer"}},{"name":"quantity","in":"query","schema":{"type":"integer","default":1}},{"name":"beneficiary","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Quote with payment metadata"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/a2a/capabilities":{"get":{"operationId":"getAgenticA2aCapabilities","tags":["a2a"],"summary":"A2A capabilities and canonical buy contract","responses":{"200":{"description":"A2A capabilities manifest"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/a2a/offers":{"get":{"operationId":"getAgenticA2aOffers","tags":["a2a"],"summary":"List active sale offers (A2A)","responses":{"200":{"description":"Active catalog entries"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/a2a/quote":{"post":{"operationId":"postAgenticA2aQuote","tags":["a2a"],"summary":"Get A2A payment quote for a sale","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["saleId","beneficiary"],"properties":{"saleId":{"type":"integer","minimum":1},"quantity":{"type":"integer","minimum":1,"default":1},"beneficiary":{"type":"string","description":"EVM address that will receive the minted NFT"}}}}}},"responses":{"200":{"description":"Quote for A2A purchase"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/a2a/buy":{"post":{"operationId":"postAgenticA2aBuy","tags":["a2a"],"summary":"Buy an NFT sale through A2A","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["saleId","beneficiary"],"properties":{"saleId":{"type":"integer","minimum":1},"quantity":{"type":"integer","minimum":1,"default":1},"beneficiary":{"type":"string","description":"EVM address that will receive the minted NFT"}}}}}},"responses":{"200":{"description":"Purchase settled"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"402":{"description":"Payment Required"},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/a2a/purchases/{paymentTx}":{"get":{"operationId":"getAgenticA2aPurchasesPaymentTx","tags":["a2a"],"summary":"Read A2A purchase status by payment transaction hash","parameters":[{"name":"paymentTx","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Purchase status"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Not found","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/frames/image/{saleId}":{"get":{"operationId":"getAgenticFramesImageSaleId","tags":["a2a"],"summary":"Frame image for a sale","parameters":[{"name":"saleId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"SVG image"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/frames/buy/{saleId}":{"get":{"operationId":"getAgenticFramesBuySaleId","tags":["a2a"],"summary":"Frame buy page for a sale","parameters":[{"name":"saleId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"HTML buy page"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/agentic/x402/buy":{"post":{"operationId":"postAgenticX402Buy","tags":["Gaming","x402"],"summary":"Buy an NFT sale through canonical x402","description":"First call returns HTTP 402 with PAYMENT-REQUIRED. Retry the exact same JSON body with PAYMENT-SIGNATURE after settlement. Copy challenge.resource and challenge.accepts[0] verbatim into the decoded PAYMENT-SIGNATURE payload.","parameters":[{"name":"X-FLOW-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional caller-provided correlation id. Reuse the same value when retrying a payment challenge if you want stable tracing."},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Base64url-encoded canonical x402 payment proof. The decoded JSON must reuse the latest PAYMENT-REQUIRED resource and must copy accepts[0] verbatim into accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentSignatureDecoded"},"example":{"x402Version":2,"resource":{"url":"https://x402.clashofcoins.com/agentic/x402/buy","description":"Agentic checkout for Clash of Coins","mimeType":"application/json"},"accepted":{"scheme":"exact","network":"eip155:8453","amount":"9000000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","maxTimeoutSeconds":300,"extra":{"name":"USD Coin","version":"2"}},"payload":{"authorization":{"from":"0x1111111111111111111111111111111111111111","to":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","value":"9000000","validAfter":"0","validBefore":"1735689600","nonce":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"signature":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}}}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["saleId","beneficiary"],"properties":{"saleId":{"type":"integer","minimum":1},"quantity":{"type":"integer","minimum":1,"default":1},"beneficiary":{"type":"string","description":"EVM address that will receive the minted NFT"}}},"example":{"saleId":391,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"}}}},"responses":{"200":{"description":"Payment settled and purchase accepted for mint delivery","headers":{"X-FLOW-ID":{"description":"Request correlation id. Send the latest X-FLOW-ID again on retries if you want stable tracing across challenge, settlement, and status polling.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"flowId":"uuid","saleId":391,"quantity":1,"paymentTx":"0xpaymenttx","saleTx":"0xsale","beneficiary":"0x1111111111111111111111111111111111111111","status":"submitted"}}}},"202":{"description":"Payment settled, mint delivery still pending","headers":{"X-FLOW-ID":{"description":"Request correlation id. Send the latest X-FLOW-ID again on retries if you want stable tracing across challenge, settlement, and status polling.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"flowId":"uuid","saleId":391,"quantity":1,"paymentTx":"0xpaymenttx","beneficiary":"0x1111111111111111111111111111111111111111","status":"payment_settled_pending_mint"}}}},"400":{"description":"Invalid request","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"description":"Protocol payment requirement","schema":{"type":"string"}},"WWW-Authenticate":{"description":"Bearer/OAuth metadata hint for protected resource discovery.","schema":{"type":"string"}},"PAYMENT-SIGNATURE":{"description":"Header name used by x402 clients when retrying a paid request.","schema":{"type":"string"}},"PAYMENT-RESPONSE":{"description":"Payment settlement response details when facilitator returns them.","schema":{"type":"string"}},"X-FLOW-ID":{"description":"Request correlation id. Send the latest X-FLOW-ID again on retries if you want stable tracing across challenge, settlement, and status polling.","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"paymentRequired":{"value":{"error":"payment_required","paymentRetry":{"header":"PAYMENT-SIGNATURE","preserveRequestBody":true,"requiredPaymentPayloadFields":["resource","accepted"]}}},"invalidPaymentSignature":{"value":{"error":"invalid_signature","reason":"accepted_field_mismatch","hint":"The paid retry accepted field does not exactly match PAYMENT-REQUIRED.accepts[0]. Copy the accepted object verbatim before retrying."}}}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"example":{"error":"Too many retries for this payment","message":"This payment proof was retried too many times. Wait briefly before retrying.","retryAfter":60}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}},"x-payment-info":{"authMode":"paid","protocols":[{"x402":{"network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d"}}],"price":{"mode":"dynamic","currency":"USD","min":"9.000000","max":"900.000000"},"recommendedClient":"@x402/fetch","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","extra":{"name":"USD Coin","version":"2"},"extensions":null,"retryHeader":"PAYMENT-SIGNATURE","retryBodyMode":"reuse_original_json","quoteOptional":true,"quotePurpose":"Use quote as a preflight to validate saleId, quantity, beneficiary, and exact payable amount before buy.","rateLimits":{"purchaseAttemptsPerIpPerMinute":30,"paidRetriesPerPaymentPerMinute":10}},"x-codeSamples":[{"lang":"JavaScript","label":"Canonical x402 client","source":"import { fetch as x402Fetch } from '@x402/fetch';\nimport { createWalletClient, http } from 'viem';\nimport { privateKeyToAccount } from 'viem/accounts';\nimport { base } from 'viem/chains';\n\nconst walletClient = createWalletClient({\n  account: privateKeyToAccount(process.env.PRIVATE_KEY),\n  chain: base,\n  transport: http(process.env.RPC_URL),\n});\n\nconst response = await x402Fetch('https://x402.clashofcoins.com/agentic/x402/buy', {\n  method: 'POST',\n  headers: { 'content-type': 'application/json' },\n  body: JSON.stringify({\n  \"saleId\": 391,\n  \"quantity\": 1,\n  \"beneficiary\": \"0x1111111111111111111111111111111111111111\"\n}),\n  walletClient,\n});\n\nconst result = await response.json();\nconsole.log(result);"}]}},"/agentic/x402/purchases/{paymentTx}":{"get":{"operationId":"getAgenticX402PurchasesPaymentTx","tags":["x402"],"summary":"Read sale purchase status by payment transaction hash","description":"Poll this endpoint after POST /agentic/x402/buy returns HTTP 202 or whenever you need final mint confirmation.","parameters":[{"name":"paymentTx","in":"path","required":true,"description":"Payment transaction hash returned by the buy response.","schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},{"name":"X-FLOW-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional caller-provided correlation id. Reuse the same value if you want to group polling with the original purchase attempt."}],"responses":{"200":{"description":"Mint delivery confirmed","headers":{"X-FLOW-ID":{"description":"Request correlation id. Send the latest X-FLOW-ID again on retries if you want stable tracing across challenge, settlement, and status polling.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"flowId":"uuid","saleId":391,"quantity":1,"paymentTx":"0xpaymenttx","saleTx":"0xsale","beneficiary":"0x1111111111111111111111111111111111111111","status":"confirmed"}}}},"202":{"description":"Payment settled, mint delivery still pending","headers":{"X-FLOW-ID":{"description":"Request correlation id. Send the latest X-FLOW-ID again on retries if you want stable tracing across challenge, settlement, and status polling.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"flowId":"uuid","saleId":391,"quantity":1,"paymentTx":"0xpaymenttx","beneficiary":"0x1111111111111111111111111111111111111111","status":"payment_settled_pending_mint"}}}},"400":{"description":"Invalid paymentTx","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Purchase not found","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/api/shop/items":{"get":{"operationId":"getShopApiShopItems","summary":"List active game shop items","parameters":[{"name":"nickname","in":"query","required":false,"schema":{"type":"string"}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Catalog response"},"400":{"description":"Invalid recipient query. Provide either nickname or address, not both.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/offers":{"get":{"operationId":"getShopX402Offers","summary":"List active game shop items for x402 checkout","parameters":[{"name":"nickname","in":"query","required":false,"schema":{"type":"string"}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Active shop items. Omitting nickname and address returns the general catalog; providing one returns personalized offers for that user.","content":{"application/json":{"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a player nickname.","protocol":"x402","payment":{"protocol":"x402","scheme":"exact"},"offers":[]}}}},"400":{"description":"Invalid recipient query. Provide either nickname or address, not both.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/quote":{"post":{"operationId":"postShopX402Quote","summary":"Quote a game shop purchase through x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nickname":{"type":"string","description":"Clash of Coins player nickname that should receive delivery"},"address":{"type":"string","description":"Optional EVM address used to resolve and verify the recipient"},"itemId":{"type":"string","description":"Single-item shorthand for buying one catalog item"},"quantity":{"type":"integer","minimum":1,"default":1,"description":"Quantity used together with itemId shorthand"}},"oneOf":[{"required":["nickname","itemId"]},{"required":["address","itemId"]}]}}}},"responses":{"200":{"description":"Purchase quote","content":{"application/json":{"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","checkoutType":"shop","discountBps":0,"discountPercent":"10","hasDiscount":true,"catalogFetchedAt":"2026-04-06T12:00:00.000Z","catalogRevision":"catalog-revision-1","protocol":"x402","payment":{"protocol":"x402","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","currencySymbol":"USDC","paymentAddress":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d"},"recipient":{"nickname":"PlayerOne","address":null},"items":[{"itemId":"item-id","quantity":1,"baseUnitPriceUsd":"5","discountedUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseTotalPriceUsd":"5","totalPriceUsd":"5","totalPriceAtomic":"5000000","offer":{"id":"item-id","title":"Starter Pack"}}],"totalQuantity":1,"baseTotalPriceUsd":"5","discountAmountUsd":"0","totalPriceUsd":"5","totalPriceAtomic":"5000000"}}}},"400":{"description":"Invalid request","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/chain-info":{"get":{"operationId":"getShopX402ChainInfo","summary":"Read chain and payment domain information for shop x402 checkout","responses":{"200":{"description":"Current x402 chain and domain configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopX402ChainInfo"},"example":{"chainId":8453,"networkId":"eip155:8453","usdcAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","paymentRecipient":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","transferMethod":""}}}},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/health":{"get":{"operationId":"getShopX402Health","summary":"Read x402 protocol metadata, headers, and rate-limit hints for shop checkout","responses":{"200":{"description":"Current x402 runtime metadata for agents and clients","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopX402HealthResponse"},"example":{"protocol":"x402","x402Version":2,"supportedSchemes":["exact"],"chainId":8453,"networkId":"eip155:8453","usdcAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","paymentRecipient":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","transferMethod":"","gasSponsorshipExtensions":[],"endpoints":{"offers":"/shop/x402/offers","quote":"/shop/x402/quote","buy":"/shop/x402/buy","purchaseStatus":"/shop/x402/purchases/{paymentReference}","statusByWalletItem":"/shop/x402/status?wallet={wallet}&itemId={itemId}","chainInfo":"/shop/x402/chain-info","openapi":"/shop/x402/openapi.json"},"headers":{"paymentRequired":"PAYMENT-REQUIRED","paidRetry":"PAYMENT-SIGNATURE","success":["PAYMENT-RESPONSE","X-PAYMENT-RESPONSE","Payment-Receipt"]},"rateLimits":{"unpaidPurchaseAttemptsPerIpPerMinute":30,"paidRetriesPerPaymentPerMinute":10}}}}},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/status":{"get":{"operationId":"getShopX402Status","summary":"Check whether a wallet already paid for an x402 shop item","parameters":[{"name":"wallet","in":"query","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Latest matching payment status for the wallet and item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopX402StatusByWalletItem"},"example":{"paid":true,"purchaseId":"purchase-1","txHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","paymentStatus":"settled","deliveryStatus":"delivered","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","genericStatusEndpoint":"/shop/purchase-status/purchase-1","itemId":"item-id","wallet":"0x1111111111111111111111111111111111111111"}}}},"400":{"description":"Invalid wallet or itemId query","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/buy":{"post":{"operationId":"buyShopX402","tags":["Gaming","x402"],"summary":"Buy a Clash of Coins game shop item with x402","description":"Settles an x402 USDC payment and credits the purchased item through the Clash of Coins backend delivery endpoint.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Paid retries must keep the JSON body unchanged and send a canonical PAYMENT-SIGNATURE built from the latest PAYMENT-REQUIRED challenge, including its resource and one accepted payment requirement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentSignatureDecoded"},"example":{"x402Version":2,"resource":{"url":"https://x402.clashofcoins.com/shop/x402/buy","description":"Agentic checkout for Clash of Coins","mimeType":"application/json"},"accepted":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"5000000","payTo":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","extra":{"name":"USD Coin","version":"2"}},"payload":{"authorization":{"from":"0x1111111111111111111111111111111111111111","to":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","value":"5000000","validAfter":"0","validBefore":"1735689600","nonce":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"signature":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}}}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nickname":{"type":"string","description":"Clash of Coins player nickname that should receive delivery"},"address":{"type":"string","description":"Optional EVM address used to resolve and verify the recipient"},"itemId":{"type":"string","description":"Single-item shorthand for buying one catalog item"},"quantity":{"type":"integer","minimum":1,"default":1,"description":"Quantity used together with itemId shorthand"}},"oneOf":[{"required":["nickname","itemId"]},{"required":["address","itemId"]}]}}}},"x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.000000","max":"0.000000"},"authMode":"paid","retryHeader":"PAYMENT-SIGNATURE","recommendedClient":"@x402/fetch","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","quoteOptional":true,"quotePurpose":"Use quote as a preflight to validate recipient, item selection, discount, and exact payable amount before buy.","extensions":null,"rateLimits":{"unpaidPurchaseAttemptsPerIpPerMinute":30,"paidRetriesPerPaymentPerMinute":10}},"x-codeSamples":[{"lang":"JavaScript","label":"Canonical x402 client","source":"import { fetch as x402Fetch } from '@x402/fetch';\nimport { createWalletClient, http } from 'viem';\nimport { privateKeyToAccount } from 'viem/accounts';\nimport { base } from 'viem/chains';\n\nconst walletClient = createWalletClient({\n  account: privateKeyToAccount(process.env.PRIVATE_KEY),\n  chain: base,\n  transport: http(process.env.RPC_URL),\n});\n\nconst response = await x402Fetch('https://x402.clashofcoins.com/shop/x402/buy', {\n  method: 'POST',\n  headers: { 'content-type': 'application/json' },\n  body: JSON.stringify({\n  \"nickname\": \"PlayerOne\",\n  \"itemId\": \"item-id\",\n  \"quantity\": 1\n}),\n  walletClient,\n});\n\nconst result = await response.json();\nconsole.log(result);"}],"responses":{"200":{"description":"Payment settled and delivery completed or already recorded","headers":{"PAYMENT-RESPONSE":{"description":"Canonical encoded x402 payment response header for the settled payment.","schema":{"type":"string"}},"X-PAYMENT-RESPONSE":{"description":"Compatibility alias for PAYMENT-RESPONSE.","schema":{"type":"string"}},"Payment-Receipt":{"description":"Convenience alias for the settled payment reference.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchaseStatusResponse"},"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","protocol":"x402","purchaseId":"purchase-1","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","recipient":{"nickname":"PlayerOne","address":null},"payer":"0x1111111111111111111111111111111111111111","items":[{"itemId":"item-id","itemTitle":"Starter Pack","quantity":1,"baseUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseAmountUsd":"5","amountUsd":"5"}],"totalQuantity":1,"baseAmountUsd":"5","discountBps":0,"discountAmountUsd":"0","amountUsd":"5","currency":"USDC","network":"eip155:8453","catalogRevision":"catalog-revision-1","offerSnapshot":[],"paymentStatus":"settled","deliveryStatus":"delivered","deliveryAttempts":1,"delivery":{"success":true,"retryable":false,"response":{"ok":true},"error":null},"createdAt":"2026-04-06T12:00:00.000Z","updatedAt":"2026-04-06T12:00:05.000Z","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"x402","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"202":{"description":"Payment settled, delivery pending or retryable","headers":{"PAYMENT-RESPONSE":{"description":"Canonical encoded x402 payment response header for the settled payment.","schema":{"type":"string"}},"X-PAYMENT-RESPONSE":{"description":"Compatibility alias for PAYMENT-RESPONSE.","schema":{"type":"string"}},"Payment-Receipt":{"description":"Convenience alias for the settled payment reference.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchaseStatusResponse"},"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","protocol":"x402","purchaseId":"purchase-1","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","recipient":{"nickname":"PlayerOne","address":null},"payer":"0x1111111111111111111111111111111111111111","items":[{"itemId":"item-id","itemTitle":"Starter Pack","quantity":1,"baseUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseAmountUsd":"5","amountUsd":"5"}],"totalQuantity":1,"baseAmountUsd":"5","discountBps":0,"discountAmountUsd":"0","amountUsd":"5","currency":"USDC","network":"eip155:8453","catalogRevision":"catalog-revision-1","offerSnapshot":[],"paymentStatus":"settled","deliveryStatus":"pending","deliveryAttempts":0,"delivery":null,"createdAt":"2026-04-06T12:00:00.000Z","updatedAt":"2026-04-06T12:00:05.000Z","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"x402","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"400":{"description":"Invalid request","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"402":{"description":"Paid retries must keep the JSON body unchanged and send a canonical PAYMENT-SIGNATURE built from the latest PAYMENT-REQUIRED challenge, including its resource and one accepted payment requirement.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ShopX402PaymentRequiredResponse"},{"$ref":"#/components/schemas/ShopX402SettlementErrorResponse"}]},"examples":{"PaymentRequired":{"value":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","checkoutType":"shop","discountBps":1000,"discountPercent":"10","hasDiscount":true,"catalogFetchedAt":null,"catalogRevision":null,"protocol":"x402","error":"payment_required","recipient":{"nickname":"PlayerOne","address":null},"items":[{"itemId":"item-id","quantity":1,"totalPriceUsd":"5","totalPriceAtomic":"5000000","offer":{"id":"item-id","title":"Example Shop Item"}}],"totalQuantity":1,"totalPriceUsd":"5","totalPriceAtomic":"5000000","paymentFieldHints":{"amountType":"string_atomic","nonceFormat":"hex_32bytes_with_0x_prefix","paidRetryHeader":"PAYMENT-SIGNATURE","preserveRequestBody":true,"acceptedMustEchoFromHeader":true},"userMessage":"Confirm to proceed with Example Shop Item for $5 USDC.","paymentRetry":{"header":"PAYMENT-SIGNATURE","preserveRequestBody":true,"requiredPaymentPayloadFields":["resource","accepted"],"facilitatorSettlement":"required"}}},"SettlementFailed":{"value":{"error":"insufficient_funds","reason":"insufficient balance","message":"The signature was valid, but facilitator settlement could not transfer the required amount.","required":"5000000","requiredAmountType":"string_atomic","totalPriceUsd":"5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","paymentRecipient":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","chainInfoEndpoint":"/shop/x402/chain-info","statusEndpoint":null,"statusByWalletItemEndpoint":"/shop/x402/status?wallet=0x1111111111111111111111111111111111111111&itemId=item-id","paymentReference":null,"settlementTxHash":null,"payer":"0x1111111111111111111111111111111111111111","purchaseId":null,"paymentSettled":false,"hint":"The signature was valid, but settlement failed because the payer wallet does not currently hold enough USDC for this purchase.","paymentRetry":{"header":"PAYMENT-SIGNATURE","preserveRequestBody":true,"requiredPaymentPayloadFields":["resource","accepted"],"facilitatorSettlement":"required"}}}}}},"headers":{"PAYMENT-REQUIRED":{"description":"Semantic challenge header for unpaid purchase requests.","schema":{"type":"string"}},"WWW-Authenticate":{"description":"Bearer/OAuth metadata hint for protected resource discovery.","schema":{"type":"string"}},"PAYMENT-SIGNATURE":{"description":"Header name used by x402 clients when retrying a paid request.","schema":{"type":"string"}},"PAYMENT-RESPONSE":{"description":"Payment settlement response details when facilitator returns them.","schema":{"type":"string"}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}},"get":{"operationId":"getShopX402Buy","summary":"Probe the x402 checkout endpoint","responses":{"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"402":{"description":"Paid retries must keep the JSON body unchanged and send a canonical PAYMENT-SIGNATURE built from the latest PAYMENT-REQUIRED challenge, including its resource and one accepted payment requirement.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ShopX402PaymentRequiredResponse"},{"$ref":"#/components/schemas/ShopX402SettlementErrorResponse"}]},"examples":{"PaymentRequired":{"value":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","checkoutType":"shop","discountBps":1000,"discountPercent":"10","hasDiscount":true,"catalogFetchedAt":null,"catalogRevision":null,"protocol":"x402","error":"payment_required","recipient":{"nickname":"PlayerOne","address":null},"items":[{"itemId":"item-id","quantity":1,"totalPriceUsd":"5","totalPriceAtomic":"5000000","offer":{"id":"item-id","title":"Example Shop Item"}}],"totalQuantity":1,"totalPriceUsd":"5","totalPriceAtomic":"5000000","paymentFieldHints":{"amountType":"string_atomic","nonceFormat":"hex_32bytes_with_0x_prefix","paidRetryHeader":"PAYMENT-SIGNATURE","preserveRequestBody":true,"acceptedMustEchoFromHeader":true},"userMessage":"Confirm to proceed with Example Shop Item for $5 USDC.","paymentRetry":{"header":"PAYMENT-SIGNATURE","preserveRequestBody":true,"requiredPaymentPayloadFields":["resource","accepted"],"facilitatorSettlement":"required"}}},"SettlementFailed":{"value":{"error":"insufficient_funds","reason":"insufficient balance","message":"The signature was valid, but facilitator settlement could not transfer the required amount.","required":"5000000","requiredAmountType":"string_atomic","totalPriceUsd":"5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","paymentRecipient":"0x8b29DABD6fBb5A09DAcbC7978eaed66A8540721d","chainInfoEndpoint":"/shop/x402/chain-info","statusEndpoint":null,"statusByWalletItemEndpoint":"/shop/x402/status?wallet=0x1111111111111111111111111111111111111111&itemId=item-id","paymentReference":null,"settlementTxHash":null,"payer":"0x1111111111111111111111111111111111111111","purchaseId":null,"paymentSettled":false,"hint":"The signature was valid, but settlement failed because the payer wallet does not currently hold enough USDC for this purchase.","paymentRetry":{"header":"PAYMENT-SIGNATURE","preserveRequestBody":true,"requiredPaymentPayloadFields":["resource","accepted"],"facilitatorSettlement":"required"}}}}}}},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/purchase-status/{purchaseId}":{"get":{"operationId":"getShopPurchaseStatusPurchaseId","summary":"Get purchase status by purchase id","parameters":[{"name":"purchaseId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Purchase status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchaseStatusResponse"},"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","protocol":"x402","purchaseId":"purchase-1","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","recipient":{"nickname":"PlayerOne","address":null},"payer":"0x1111111111111111111111111111111111111111","items":[{"itemId":"item-id","itemTitle":"Starter Pack","quantity":1,"baseUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseAmountUsd":"5","amountUsd":"5"}],"totalQuantity":1,"baseAmountUsd":"5","discountBps":0,"discountAmountUsd":"0","amountUsd":"5","currency":"USDC","network":"eip155:8453","catalogRevision":"catalog-revision-1","offerSnapshot":[],"paymentStatus":"settled","deliveryStatus":"delivered","deliveryAttempts":1,"delivery":{"success":true,"retryable":false,"response":{"ok":true},"error":null},"createdAt":"2026-04-06T12:00:00.000Z","updatedAt":"2026-04-06T12:00:05.000Z","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"x402","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"202":{"description":"Purchase still pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchaseStatusResponse"},"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","protocol":"x402","purchaseId":"purchase-1","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","recipient":{"nickname":"PlayerOne","address":null},"payer":"0x1111111111111111111111111111111111111111","items":[{"itemId":"item-id","itemTitle":"Starter Pack","quantity":1,"baseUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseAmountUsd":"5","amountUsd":"5"}],"totalQuantity":1,"baseAmountUsd":"5","discountBps":0,"discountAmountUsd":"0","amountUsd":"5","currency":"USDC","network":"eip155:8453","catalogRevision":"catalog-revision-1","offerSnapshot":[],"paymentStatus":"settled","deliveryStatus":"pending","deliveryAttempts":0,"delivery":null,"createdAt":"2026-04-06T12:00:00.000Z","updatedAt":"2026-04-06T12:00:05.000Z","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"x402","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Purchase not found","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/payments/history":{"get":{"operationId":"getShopPaymentsHistory","summary":"List recent purchases (requires secret header)","parameters":[{"name":"X-HISTORY-SECRET","in":"header","required":true,"schema":{"type":"string"},"description":"Shared secret for history access"},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Purchase history list"},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"401":{"description":"Unauthorized — missing or invalid secret header"},"404":{"description":"Resource not found for the supplied route parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}},"/shop/x402/purchases/{paymentReference}":{"get":{"operationId":"getShopX402PurchasesPaymentReference","summary":"Get x402 purchase status by payment reference","parameters":[{"name":"paymentReference","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Purchase status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchaseStatusResponse"},"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","protocol":"x402","purchaseId":"purchase-1","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","recipient":{"nickname":"PlayerOne","address":null},"payer":"0x1111111111111111111111111111111111111111","items":[{"itemId":"item-id","itemTitle":"Starter Pack","quantity":1,"baseUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseAmountUsd":"5","amountUsd":"5"}],"totalQuantity":1,"baseAmountUsd":"5","discountBps":0,"discountAmountUsd":"0","amountUsd":"5","currency":"USDC","network":"eip155:8453","catalogRevision":"catalog-revision-1","offerSnapshot":[],"paymentStatus":"settled","deliveryStatus":"delivered","deliveryAttempts":1,"delivery":{"success":true,"retryable":false,"response":{"ok":true},"error":null},"createdAt":"2026-04-06T12:00:00.000Z","updatedAt":"2026-04-06T12:00:05.000Z","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"x402","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"202":{"description":"Purchase still pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchaseStatusResponse"},"example":{"catalogTitle":"Clash of Coins Game Shop","catalogLocale":"en","catalogDescription":"Browse in-game goods for Clash of Coins, pay in USDC via x402 or MPP, and receive backend delivery to a verified player identified by nickname or address.","protocol":"x402","purchaseId":"purchase-1","paymentReference":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","recipient":{"nickname":"PlayerOne","address":null},"payer":"0x1111111111111111111111111111111111111111","items":[{"itemId":"item-id","itemTitle":"Starter Pack","quantity":1,"baseUnitPriceUsd":"5","unitPriceUsd":"5","discountBps":0,"discountPercent":"0","hasDiscount":false,"baseAmountUsd":"5","amountUsd":"5"}],"totalQuantity":1,"baseAmountUsd":"5","discountBps":0,"discountAmountUsd":"0","amountUsd":"5","currency":"USDC","network":"eip155:8453","catalogRevision":"catalog-revision-1","offerSnapshot":[],"paymentStatus":"settled","deliveryStatus":"pending","deliveryAttempts":0,"delivery":null,"createdAt":"2026-04-06T12:00:00.000Z","updatedAt":"2026-04-06T12:00:05.000Z","statusEndpoint":"/shop/x402/purchases/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"x402","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"400":{"description":"Invalid request body, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"404":{"description":"Purchase not found","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"429":{"description":"Rate limit exceeded. Respect Retry-After before retrying.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"500":{"description":"Transient server error. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"502":{"description":"Upstream gateway or facilitator error. Retry status/read routes before repeating payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"503":{"description":"Service temporarily unavailable. Retry with bounded exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}},"504":{"description":"Gateway timeout. Poll status routes before creating another payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"},"example":{"error":"request_failed","message":"Operation failed. Inspect status and recovery guidance."}}}}}}}},"components":{"schemas":{"X402Resource":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"X402AcceptedRequirement":{"type":"object","required":["scheme","network","amount","asset","payTo"],"properties":{"scheme":{"type":"string","example":"exact"},"network":{"type":"string"},"amount":{"type":"string","description":"Atomic token amount as a decimal string."},"asset":{"type":"string","description":"ERC-20 token address."},"payTo":{"type":"string","description":"Recipient address that receives settlement."},"maxTimeoutSeconds":{"type":"integer"},"extra":{"type":"object","additionalProperties":true,"description":"Optional payment requirement metadata copied from PAYMENT-REQUIRED.accepts[0]."}}},"X402PaymentAuthorization":{"type":"object","required":["from","to","value","validAfter","validBefore","nonce"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string"},"validAfter":{"type":"string"},"validBefore":{"type":"string"},"nonce":{"type":"string"}}},"X402PaymentPayload":{"type":"object","required":["authorization","signature"],"properties":{"authorization":{"$ref":"#/components/schemas/X402PaymentAuthorization"},"signature":{"type":"string"}}},"X402PaymentSignatureDecoded":{"type":"object","required":["x402Version","resource","accepted","payload"],"properties":{"x402Version":{"type":"integer","example":2},"resource":{"$ref":"#/components/schemas/X402Resource"},"accepted":{"$ref":"#/components/schemas/X402AcceptedRequirement"},"payload":{"$ref":"#/components/schemas/X402PaymentPayload"}}},"GatewayError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"recovery":{"type":"string"},"status":{"type":"integer"}},"additionalProperties":true}},"securitySchemes":{"x402PaymentSignature":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"Paid retries must keep the JSON body unchanged and send a canonical PAYMENT-SIGNATURE built from the latest PAYMENT-REQUIRED challenge, including its resource and one accepted payment requirement."}},"examples":{}},"x-x402-shop":{"serviceName":"Clash of Coins","serviceDescription":"Agentic checkout for Clash of Coins","discovery":{"openapi":"/openapi.json","openapiFull":"/openapi.full.json","catalog":"/catalog","resources":"/discovery/resources","mcp":"/mcp.json","skillsIndex":"/skills/index.json","wellKnownSkillsIndex":"/.well-known/skills/index.json","x402":"/.well-known/x402","mpp":null,"llms":"/llms.txt","agent":"/.well-known/agent.json","agents":"/.well-known/agents.json","skill":"/skill.md","publishedRouterSkill":"/skills/clashofcoins-universal/SKILL.md","publishedRouterSkillAliases":["/skills/SKILL.md","/skills/clashofcoins-universal/skill.md","/skills/clashofcoins-universal","/skills/clashofcoins/SKILL.md","/skills/clashofcoins/skill.md","/skills/clashofcoins"],"agentcashValidatorSkill":"/agentcash-validator-skill.md","agentWallet":"/agent-wallet","agentWalletFunding":"/agent-wallet/x402/fund","agentWalletFundingProtocol":"x402","agentWalletMppFunding":false,"agentWalletFundingRoutes":{"x402":"/agent-wallet/x402/fund"},"agentWalletAutoExecuteOnFunding":true,"agentWalletPurchaseProtocols":{"sale":["x402"],"shop":["x402"]}},"checkouts":{"sale":{"serviceName":"Clash of Coins","serviceDescription":"Agentic checkout for Clash of Coins","profileId":"base","networkId":"eip155:8453","saleAddress":"0x3C83eF6119EB05Ca44144F05b331dbEE60656d5b","configuredSaleIds":[391,392,393,394],"availableSaleIds":[391,392,393,394],"canonicalX402Endpoint":"/agentic/x402/buy","discovery":{"x402":"/.well-known/x402","mpp":null,"llms":"/llms.txt","agent":"/.well-known/agent.json","agents":"/.well-known/agents.json","skill":"https://x402.clashofcoins.com/skill.md"},"readEndpoints":{"health":"/health","catalog":"/agentic/x402/offers","quote":"/agentic/x402/quote","purchaseStatus":"/agentic/x402/purchases/{paymentTx}"},"skillUrl":"https://x402.clashofcoins.com/skill.md","activeSales":[{"saleId":391,"status":"active","price":"9 USDC","basePrice":"10 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999980,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/initiate.json","nftContractAddress":"0x49046e2988a78222693c04ad049b68e5a4801034"},{"saleId":392,"status":"active","price":"90 USDC","basePrice":"100 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999998,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/commander.json","nftContractAddress":"0x49046e2988a78222693c04ad049b68e5a4801034"},{"saleId":393,"status":"active","price":"900 USDC","basePrice":"1000 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999999,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/warlord.json","nftContractAddress":"0x49046e2988a78222693c04ad049b68e5a4801034"},{"saleId":394,"status":"active","price":"270 USDC","basePrice":"300 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999999,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/heropack.json","nftContractAddress":"0x49046e2988a78222693c04ad049b68e5a4801034"}],"channels":{"x402":{"listSalesEndpoint":"/agentic/x402/offers","quoteSaleEndpoint":"/agentic/x402/quote","purchaseEndpoint":"/agentic/x402/buy","purchaseStatusEndpointTemplate":"/agentic/x402/purchases/{paymentTx}"},"a2a":{"manifestEndpoint":"/agentic/a2a/capabilities","listSalesEndpoint":"/agentic/a2a/offers","quoteSaleEndpoint":"/agentic/a2a/quote","buyEndpoint":"/agentic/a2a/buy","purchaseStatusEndpointTemplate":"/agentic/a2a/purchases/{paymentTx}"},"frames":{"gatewayUrl":"https://x402.clashofcoins.com","buyFrameTemplate":"https://x402.clashofcoins.com/agentic/frames/buy/{saleId}/{playerRef}","frontendCheckoutBaseUrl":"https://x402.clashofcoins.com"}},"xmtp":null,"mpp":null,"a2a":{"channel":"a2a","profileId":"base","network":"eip155:8453","capabilities":{"discovery":"/agentic/a2a/offers","quote":"/agentic/a2a/quote","buy":"/agentic/a2a/buy","purchaseStatus":"/agentic/a2a/purchases/{paymentTx}","x402Discovery":"/.well-known/x402"},"commands":[],"channels":{"x402":{"listSalesEndpoint":"/agentic/x402/offers","quoteSaleEndpoint":"/agentic/x402/quote","purchaseEndpoint":"/agentic/x402/buy","purchaseStatusEndpointTemplate":"/agentic/x402/purchases/{paymentTx}"},"a2a":{"manifestEndpoint":"/agentic/a2a/capabilities","listSalesEndpoint":"/agentic/a2a/offers","quoteSaleEndpoint":"/agentic/a2a/quote","buyEndpoint":"/agentic/a2a/buy","purchaseStatusEndpointTemplate":"/agentic/a2a/purchases/{paymentTx}"},"frames":{"gatewayUrl":"https://x402.clashofcoins.com","buyFrameTemplate":"https://x402.clashofcoins.com/agentic/frames/buy/{saleId}/{playerRef}","frontendCheckoutBaseUrl":"https://x402.clashofcoins.com"}}}},"shop":{"serviceName":"Clash of Coins","serviceDescription":"Agentic checkout for Clash of Coins","checkoutType":"shop","canonicalX402Endpoint":"/shop/x402/buy","discovery":{"root":"/shop","openapi":"/shop/openapi.json","openapiFull":"/shop/openapi.full.json","x402":"/shop/.well-known/x402","mpp":null,"xmtp":null,"llms":"/shop/llms.txt","agent":"/shop/.well-known/agent.json","agents":"/shop/.well-known/agents.json","skill":"/shop/skill.md"},"x402":{"buy":"/shop/x402/buy","quote":"/shop/x402/quote","purchaseStatus":"/shop/x402/purchases/{paymentReference}","genericStatus":"/shop/purchase-status/{purchaseId}","statusByWalletItem":"/shop/x402/status?wallet={wallet}&itemId={itemId}","chainInfo":"/shop/x402/chain-info","health":"/shop/x402/health","openapi":"/shop/x402/openapi.json","inputSchema":{"type":"object","properties":{"nickname":{"type":"string","description":"Clash of Coins player nickname that should receive delivery"},"address":{"type":"string","description":"Optional EVM address used to resolve and verify the recipient"},"itemId":{"type":"string","description":"Single-item shorthand for buying one catalog item"},"quantity":{"type":"integer","minimum":1,"default":1,"description":"Quantity used together with itemId shorthand"}},"oneOf":[{"required":["nickname","itemId"]},{"required":["address","itemId"]}]},"inputExample":{"nickname":"PlayerOne","itemId":"item-id","quantity":1}},"xmtp":null,"mpp":null,"activeItems":[]}}},"x-bazaar":{"version":1,"integration":"minimal","notes":"Bazaar-compatible discovery metadata. Use protocol-aware /openapi.json and route-level x-payment-info as the canonical source of payable flows.","name":"Clash of Coins","description":"Agentic checkout for Clash of Coins","category":"Gaming","tags":["Gaming"],"icon":"https://x402.clashofcoins.com/favicon.png","logoUrl":"https://x402.clashofcoins.com/favicon.png","ogImage":"https://clashofcoins.com/agentic/images/og-image.jpg","service":{"name":"Clash of Coins","description":"Agentic checkout for Clash of Coins","category":"Gaming","tags":["Gaming"],"icon":"https://x402.clashofcoins.com/favicon.png","logoUrl":"https://x402.clashofcoins.com/favicon.png","ogImage":"https://clashofcoins.com/agentic/images/og-image.jpg","addresses":{"agent":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25","treasury":"0x8b29dabd6fbb5a09dacbc7978eaed66a8540721d"}},"addresses":{"agent":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25","treasury":"0x8b29dabd6fbb5a09dacbc7978eaed66a8540721d"},"discovery":{"openapi":"/openapi.json","openapiFull":"/openapi.full.json","openapiMode":"payable","catalog":"/catalog","resources":"/discovery/resources","x402":"/.well-known/x402"},"purchase":{"saleX402Buy":{"method":"POST","path":"/agentic/x402/buy"},"shopX402Buy":{"method":"POST","path":"/shop/x402/buy"},"agentWalletFund":{"method":"POST","path":"/agent-wallet/x402/fund"},"agentWalletX402Fund":{"method":"POST","path":"/agent-wallet/x402/fund"},"agentWalletFundingProtocol":"x402","agentWalletFundingRoutes":{"x402":{"method":"POST","path":"/agent-wallet/x402/fund"}},"agentWalletPurchaseProtocols":{"sale":["x402"],"shop":["x402"]}}}}