{"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":"This protocol-aware OpenAPI document only exposes payable buy routes for the protocols enabled on this instance. Use /openapi.full.json for the richer unified sale and shop contract.","x-guidance":"This protocol-aware OpenAPI document only exposes payable buy routes for the protocols enabled on this instance. Use /openapi.full.json for the richer unified sale and shop contract.","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":{},"servers":[{"url":"https://mpp.clashofcoins.app","description":"Agentic checkout for Clash of Coins"}],"tags":[{"name":"mpp","description":"Canonical MPP purchase flows for sale and shop"},{"name":"agent-wallet","description":"Dedicated onchain agent wallet checkout flow"},{"name":"webhooks","description":"Documented checkout lifecycle event shapes"}],"paths":{"/agentic/mpp/buy":{"post":{"operationId":"buySaleMpp","tags":["Gaming","mpp"],"summary":"Buy an NFT sale through Tempo MPP","description":"First call may return HTTP 402 with a Tempo payment challenge. Retry the same request with Authorization: Payment after MPP settlement.","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":370,"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":370,"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":370,"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":{"protocols":[{"mpp":{"method":"tempo/charge","intent":"purchase","currency":"0x20c0000000000000000000000000000000000000","network":"tempo:42431"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.009000","max":"0.900000"},"intent":"charge","method":"tempo","amount":"0.900000","currency":"pathUSD","authHeader":"Authorization: Payment","retryBodyMode":"reuse_original_json","quoteOptional":true,"quotePurpose":"Use quote as a preflight to validate saleId, quantity, beneficiary, and exact payable amount before buy.","network":"tempo:42431","asset":"0x20c0000000000000000000000000000000000000","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","purchaseStatusEndpointTemplate":"/agentic/mpp/purchases/{paymentTx}","recommendedClient":"mppx","rateLimits":{"unpaidPurchaseAttemptsPerIpPerMinute":30,"paidRetriesPerPaymentPerMinute":10}},"x-codeSamples":[{"lang":"JavaScript","label":"Canonical MPP client","source":"import { Mppx, tempo } from 'mppx/client';\nimport { privateKeyToAccount } from 'viem/accounts';\n\nMppx.create({\n  methods: [tempo({ account: privateKeyToAccount(process.env.PRIVATE_KEY) })],\n});\n\nconst response = await fetch('https://mpp.clashofcoins.app/agentic/mpp/buy', {\n  method: 'POST',\n  headers: { 'content-type': 'application/json' },\n  body: JSON.stringify({\n  \"saleId\": 370,\n  \"quantity\": 1,\n  \"beneficiary\": \"0x1111111111111111111111111111111111111111\"\n}),\n});\n\nconst result = await response.json();\nconsole.log(result);"}]}},"/shop/mpp/buy":{"post":{"operationId":"buyShopMpp","tags":["Gaming","mpp"],"summary":"Buy a Clash of Coins game shop item with Tempo MPP","description":"Canonical payable MPP route for Clash of Coins shop purchases. Use the same JSON body on the unpaid challenge request and the paid retry.","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"},"items":{"type":"array","minItems":1,"items":{"type":"object","required":["itemId"],"properties":{"itemId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"default":1}}}}},"oneOf":[{"required":["nickname","items"]},{"required":["address","items"]},{"required":["nickname","itemId"]},{"required":["address","itemId"]}]}}}},"responses":{"200":{"description":"Payment settled and delivery completed or already recorded","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":"mpp","purchaseId":"purchase-1","paymentReference":"tempo-ref-1","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":"pathUSD","network":"tempo:42431","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/mpp/purchases/tempo-ref-1","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"mpp","nextAction":"inform_user"},"genericStatusEndpoint":"/shop/purchase-status/purchase-1"}}}},"202":{"description":"Payment settled, delivery pending or retryable","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":"mpp","purchaseId":"purchase-1","paymentReference":"tempo-ref-1","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":"pathUSD","network":"tempo:42431","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/mpp/purchases/tempo-ref-1","userConfirmation":"Purchased 1x Starter Pack for player PlayerOne.","presentation":{"kind":"success","flow":"shop","protocol":"mpp","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":"Tempo payment challenge. Retry the same JSON body with Authorization: Payment after settlement.","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":1000,"discountPercent":"10","hasDiscount":true,"catalogFetchedAt":null,"catalogRevision":null,"protocol":"mpp","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","mpp":{"version":"1.0","method":"tempo/charge","params":{"realm":"mpp.clashofcoins.app","method":"tempo/charge","currency":"0x20c0000000000000000000000000000000000000","amount":"5","decimals":"6","recipient":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","network":"tempo:42431","memo":"0x62635f6a6e7a30737a387a000000000000000000000000000000000000000000","description":"Purchase Example Shop Item for PlayerOne"}},"userMessage":"To complete this purchase of Example Shop Item, I need $5 USDC. Confirm to proceed?","presentation":{"kind":"payment_required","flow":"shop","protocol":"mpp","title":"Payment required","subtitle":"Example Shop Item for player PlayerOne","message":"To complete this purchase of Example Shop Item, I need $5 USDC. Confirm to proceed?","bullets":["Amount: $5 USDC","Recipient: player PlayerOne","Protocol: mpp"],"nextAction":"confirm_payment","suggestedPrompt":"To complete this purchase of Example Shop Item, I need $5 USDC. Confirm to proceed?"},"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"},"items":{"type":"array","minItems":1,"items":{"type":"object","required":["itemId","quantity"],"properties":{"itemId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"default":1}}}}},"oneOf":[{"required":["nickname","items"]},{"required":["address","items"]},{"required":["nickname","itemId"]},{"required":["address","itemId"]}]},"example":{"nickname":"PlayerOne","items":[{"itemId":"item-id","quantity":1}]}}}},"agentIntegration":{"recommendedSdk":"mppx","npmInstall":"npm install mppx","canonicalUsage":"import { Mppx, tempo } from 'mppx/client';\nimport { privateKeyToAccount } from 'viem/accounts';\n\nMppx.create({\n  methods: [tempo({ account: privateKeyToAccount(process.env.PRIVATE_KEY) })],\n});\n\nawait fetch(url, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify(body),\n});","retryRule":"Settle the Tempo transfer first, then retry the exact same JSON request with Authorization: Payment.","manualImplementation":{"warning":"Manual MPP credential building is error-prone. Prefer the mppx SDK.","authHeader":"Authorization: Payment <base64-encoded JSON credential>","payloadLocation":"credential.payload","payloadFormat":{"type":"hash","hash":"<tx-hash-after-onchain-transfer>","network":"tempo:42431"}},"commonMistakes":["Using payment.transactionHash instead of credential.payload.hash","Missing credential.payload.type=\"hash\"","Retrying with a different JSON body than the unpaid challenge request","Sending the credential before the Tempo transfer exists onchain"]}}}},"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."}}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo/charge","intent":"purchase","currency":"0x20c0000000000000000000000000000000000000","network":"tempo:42431"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.000000","max":"0.000000"},"intent":"charge","method":"tempo","amount":"0.000000","currency":"pathUSD","authHeader":"Authorization: Payment","retryBodyMode":"reuse_original_json","quoteOptional":true,"quotePurpose":"Use quote as a preflight to validate recipient, cart contents, discount, and exact payable amount before buy.","network":"tempo:42431","asset":"0x20c0000000000000000000000000000000000000","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","purchaseStatusEndpointTemplate":"/shop/mpp/purchases/{paymentReference}","recommendedClient":"mppx","rateLimits":{"unpaidPurchaseAttemptsPerIpPerMinute":30,"paidRetriesPerPaymentPerMinute":10}},"x-codeSamples":[{"lang":"JavaScript","label":"Canonical MPP client","source":"import { Mppx, tempo } from 'mppx/client';\nimport { privateKeyToAccount } from 'viem/accounts';\n\nMppx.create({\n  methods: [tempo({ account: privateKeyToAccount(process.env.PRIVATE_KEY) })],\n});\n\nconst response = await fetch('https://mpp.clashofcoins.app/shop/mpp/buy', {\n  method: 'POST',\n  headers: { 'content-type': 'application/json' },\n  body: JSON.stringify({\n  \"nickname\": \"PlayerOne\",\n  \"items\": [\n    {\n      \"itemId\": \"item-id\",\n      \"quantity\": 1\n    }\n  ]\n}),\n});\n\nconst result = await response.json();\nconsole.log(result);"}]}},"/agent-wallet/mpp/fund":{"post":{"operationId":"fundAgentWalletOrder","tags":["Gaming","agent-wallet","mpp"],"summary":"Fund an agent-wallet order through MPP","description":"Pays the dedicated onchain agent wallet via the canonical mpp 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":"tempo-ref-1","order":{"orderId":"aw-ord-1","mode":"agent_wallet_mpp_funded","surface":"sale","protocol":"mpp","status":"purchase_recorded","amountUsd":"0.900000","amountAtomic":"900000","currency":"USDC","network":"tempo:42431","fundingPaymentReference":"tempo-ref-1","userToAgentTxHash":"tempo-ref-1","agentToTreasuryTxHash":"0x2222222222222222222222222222222222222222222222222222222222222222","linkedPurchaseReference":"tempo-ref-1","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":"tempo-ref-1","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":"tempo-ref-1","order":{"orderId":"aw-ord-1","mode":"agent_wallet_mpp_funded","surface":"sale","protocol":"mpp","status":"failed","amountUsd":"0.900000","amountAtomic":"900000","currency":"USDC","network":"tempo:42431","fundingPaymentReference":"tempo-ref-1","userToAgentTxHash":"tempo-ref-1","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":"MPP payment challenge. Retry the same JSON body with Authorization: Payment 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","mpp":{"version":"1.0","method":"tempo/charge","params":{"realm":"mpp.example.com","method":"tempo/charge","currency":"0x20c0000000000000000000000000000000000000","amount":"0.900000","recipient":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25","network":"tempo:42431"}}}}},"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":"0.009000","max":"0.900000"},"protocols":[{"mpp":{"method":"tempo/charge","intent":"purchase","network":"tempo:42431","currency":"0x20c0000000000000000000000000000000000000","recipient":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25"}}],"intent":"charge","method":"tempo","amount":"0.900000","currency":"USDC","authMode":"paid","retryHeader":"Authorization: Payment","quoteOptional":false,"checkoutFlow":["POST /agent-wallet/orders","/agent-wallet/mpp/fund"]}}}},"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":{"mppAuthorization":{"type":"apiKey","in":"header","name":"Authorization","description":"MPP payment credential header using the Payment auth scheme"}},"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":null,"mpp":"/.well-known/mpp","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/mpp/fund","agentWalletFundingProtocol":"mpp","agentWalletX402Funding":false,"agentWalletMppFunding":true,"agentWalletFundingRoutes":{"mpp":"/agent-wallet/mpp/fund"},"agentWalletAutoExecuteOnFunding":true,"agentWalletPurchaseProtocols":{"sale":["mpp"],"shop":["mpp"]}},"checkouts":{"sale":{"serviceName":"Clash of Coins","serviceDescription":"Agentic checkout for Clash of Coins","profileId":"base-sepolia","networkId":"eip155:84532","saleAddress":"0x9aaB2b2B9201FA906c49913aae1685ee7AFCcFA2","configuredSaleIds":[370,371,372,373],"availableSaleIds":[370,371,372,373],"canonicalX402Endpoint":null,"discovery":{"x402":null,"mpp":"/.well-known/mpp","llms":"/llms.txt","agent":"/.well-known/agent.json","agents":"/.well-known/agents.json","skill":"https://mpp.clashofcoins.app/skill.md"},"readEndpoints":{"health":"/health","catalog":null,"quote":null,"purchaseStatus":null,"mppCatalog":"/agentic/mpp/offers","mppQuote":"/agentic/mpp/quote","mppPurchaseStatus":"/agentic/mpp/purchases/{paymentTx}"},"skillUrl":"https://mpp.clashofcoins.app/skill.md","activeSales":[{"saleId":370,"status":"active","price":"0.009 USDC","basePrice":"0.01 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999960,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/initiate.json","nftContractAddress":"0x1a62b926a6272298e083085eaff6645394e31c55"},{"saleId":371,"status":"active","price":"0.09 USDC","basePrice":"0.1 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999825,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/commander.json","nftContractAddress":"0x1a62b926a6272298e083085eaff6645394e31c55"},{"saleId":372,"status":"active","price":"0.9 USDC","basePrice":"1 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999954,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/warlord.json","nftContractAddress":"0x1a62b926a6272298e083085eaff6645394e31c55"},{"saleId":373,"status":"active","price":"0.27 USDC","basePrice":"0.3 USDC","discountBps":1000,"discountPercent":"10","quantityAvailable":999999752,"metadata":"ipfs://bafybeigajagnoxbtzsfdumoma5tsm2jtkpoauxoetp2jf65kicze6eycqa/heropack.json","nftContractAddress":"0x1a62b926a6272298e083085eaff6645394e31c55"}],"channels":{"mpp":{"manifestEndpoint":"/agentic/mpp/capabilities","listSalesEndpoint":"/agentic/mpp/offers","quoteSaleEndpoint":"/agentic/mpp/quote","buyEndpoint":"/agentic/mpp/buy","purchaseStatusEndpointTemplate":"/agentic/mpp/purchases/{paymentTx}","payment":{"protocol":"mpp","method":"tempo/charge","authHeader":"Authorization: Payment","realm":"mpp.clashofcoins.app","network":"tempo:42431","asset":"0x20c0000000000000000000000000000000000000","assetSymbol":"pathUSD","recipient":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","decimals":6},"inputSchema":{"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"}}},"inputExample":{"saleId":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"},"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":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"}}}}}},"xmtp":null,"mpp":{"channel":"mpp","profileId":"base-sepolia","network":"tempo:42431","protocol":"mpp","payment":{"protocol":"mpp","scheme":"Payment","method":"tempo/charge","authHeader":"Authorization: Payment","network":"tempo:42431","asset":"0x20c0000000000000000000000000000000000000","assetSymbol":"pathUSD","recipient":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","decimals":6,"realm":"mpp.clashofcoins.app"},"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":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"}}}},"capabilities":{"discovery":"/agentic/mpp/offers","quote":"/agentic/mpp/quote","buy":"/agentic/mpp/buy","purchaseStatus":"/agentic/mpp/purchases/{paymentTx}","mppDiscovery":"/.well-known/mpp","authHeader":"Authorization: Payment","buyPaid":{"method":"POST","path":"/agentic/mpp/buy","inputSchema":{"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"}}},"inputExample":{"saleId":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"},"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":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"}}}}},"buyPayment":{"protocol":"mpp","scheme":"Payment","method":"tempo/charge","authHeader":"Authorization: Payment","network":"tempo:42431","asset":"0x20c0000000000000000000000000000000000000","assetSymbol":"pathUSD","recipient":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","decimals":6,"realm":"mpp.clashofcoins.app"}},"inputSchema":{"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"}}},"inputExample":{"saleId":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"},"channels":{"mpp":{"manifestEndpoint":"/agentic/mpp/capabilities","listSalesEndpoint":"/agentic/mpp/offers","quoteSaleEndpoint":"/agentic/mpp/quote","buyEndpoint":"/agentic/mpp/buy","purchaseStatusEndpointTemplate":"/agentic/mpp/purchases/{paymentTx}","payment":{"protocol":"mpp","method":"tempo/charge","authHeader":"Authorization: Payment","realm":"mpp.clashofcoins.app","network":"tempo:42431","asset":"0x20c0000000000000000000000000000000000000","assetSymbol":"pathUSD","recipient":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37","decimals":6},"inputSchema":{"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"}}},"inputExample":{"saleId":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"},"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":370,"quantity":1,"beneficiary":"0x1111111111111111111111111111111111111111"}}}}}}},"a2a":null},"shop":{"serviceName":"Clash of Coins","serviceDescription":"Agentic checkout for Clash of Coins","checkoutType":"shop","canonicalX402Endpoint":null,"discovery":{"root":"/shop","openapi":"/shop/openapi.json","openapiFull":"/shop/openapi.full.json","x402":null,"mpp":"/shop/.well-known/mpp","xmtp":null,"llms":"/shop/llms.txt","agent":"/shop/.well-known/agent.json","agents":"/shop/.well-known/agents.json","skill":"/shop/skill.md"},"x402":null,"xmtp":null,"mpp":{"buy":"/shop/mpp/buy","quote":"/shop/mpp/quote","purchaseStatus":"/shop/mpp/purchases/{paymentReference}","genericStatus":"/shop/purchase-status/{purchaseId}","openapi":"/shop/mpp/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"},"items":{"type":"array","minItems":1,"items":{"type":"object","required":["itemId"],"properties":{"itemId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"default":1}}}}},"oneOf":[{"required":["nickname","items"]},{"required":["address","items"]},{"required":["nickname","itemId"]},{"required":["address","itemId"]}]},"inputExample":{"nickname":"PlayerOne","items":[{"itemId":"item-id","quantity":1}]}},"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://mpp.clashofcoins.app/favicon.png","logoUrl":"https://mpp.clashofcoins.app/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://mpp.clashofcoins.app/favicon.png","logoUrl":"https://mpp.clashofcoins.app/favicon.png","ogImage":"https://clashofcoins.com/agentic/images/og-image.jpg","addresses":{"agent":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25","treasury":"0x97b7f63cb9f40a147775aa425589a334f7091e37"}},"addresses":{"agent":"0x93862e5b2b1fa10a01772e7e9ca7cdc7deb5ca25","treasury":"0x97b7f63cb9f40a147775aa425589a334f7091e37"},"discovery":{"openapi":"/openapi.json","openapiFull":"/openapi.full.json","openapiMode":"payable","catalog":"/catalog","resources":"/discovery/resources","mpp":"/.well-known/mpp"},"purchase":{"saleMppBuy":{"method":"POST","path":"/agentic/mpp/buy"},"shopMppBuy":{"method":"POST","path":"/shop/mpp/buy"},"agentWalletFund":{"method":"POST","path":"/agent-wallet/mpp/fund"},"agentWalletMppFund":{"method":"POST","path":"/agent-wallet/mpp/fund"},"agentWalletFundingProtocol":"mpp","agentWalletFundingRoutes":{"mpp":{"method":"POST","path":"/agent-wallet/mpp/fund"}},"agentWalletPurchaseProtocols":{"sale":["mpp"],"shop":["mpp"]}}}}