{"openapi":"3.1.0","info":{"title":"cart.fun API","version":"1","description":"On-chain commerce: every sale prints a receipt NFT. Agents discover stores, get signed quotes, pay on-chain, and (as merchants) run their store over this API.\n\nStart at https://cart.fun/llms.txt. Errors are { \"error\": string }. API keys: 120 requests a minute each; past that, 429 with Retry-After."},"servers":[{"url":"https://go.cart.fun"}],"tags":[{"name":"Discover"},{"name":"Buy"},{"name":"Receipts & reviews"},{"name":"Catalog"},{"name":"Sales"},{"name":"Invites"},{"name":"Webhooks"},{"name":"Keys & activation"}],"paths":{"/api/v1/stores/{chain}/{storeId}/agent":{"get":{"operationId":"getAgentCard","tags":["Discover"],"summary":"The store's ERC-8004 agent card","description":"The store's ERC-8004 agent card. cartfun.commerce says whether it takes orders, what it's paid in, how to quote and pay, and (public stores) every orderable product with prices in base units.\n\nAuth: No auth.","x-audience":["buyer","merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"linkStoreAgent","tags":["Keys & activation"],"summary":"Links a registered ERC-8004 agent to the store","description":"Links a registered ERC-8004 agent to the store. Checked on-chain: the agent's cartfun.store metadata must name the store, and the store's owner must own the agent.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","description":"The agent's id in the Identity Registry","pattern":"^\\d+$"},"txHash":{"type":"string","description":"Optional: the register transaction. The server waits for it before checking, for linking straight after registering."}},"required":["agentId"]}}}},"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/products":{"get":{"operationId":"listProducts","tags":["Discover"],"summary":"The store's catalog","description":"The store's catalog. Invite-only stores need an API key with the orders scope (or a browser pass). A key with the catalog scope also sees hidden products.\n\nAuth: Optional API key, scope `orders`.","x-audience":["buyer","merchant"],"x-scope":"orders","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{},{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"required":["products"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"createProducts","tags":["Catalog"],"summary":"Creates products","description":"Creates products. Rejects the whole batch if any sku is taken.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductInput"}}},"required":["products"]}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/catalog":{"get":{"operationId":"getCatalogSnapshot","tags":["Discover"],"summary":"The store's latest signed catalog snapshot: its on-sale products and the terms they sell under, as canonical JSON (keys sorted, no whitespace)","description":"The store's latest signed catalog snapshot: its on-sale products and the terms they sell under, as canonical JSON (keys sorted, no whitespace). contentHash = keccak256 of that JSON; signature is an EIP-712 Catalog { storeId uint16, version uint64, issuedAt uint64, contentHash bytes32 } over domain { name: \"cart.fun Catalog\", version: \"1\", chainId, verifyingContract: storeRegistry }, by the store's registered order signer (StoreRegistry.getStore(storeId).signer). A new version is published whenever the public catalog changes.\n\nAuth: Optional API key, scope `orders`.\n\nInvite-only stores need a pass or an API key with the orders scope. The store's ERC-8004 agent card points at the latest version (cartfun.catalog).","x-audience":["buyer","merchant"],"x-scope":"orders","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{},{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"object","properties":{},"description":"schema cartfun.catalog/v1: chainId, storeRegistry, storeId, checkout, paymentToken, paymentDecimals, version, issuedAt, products[]"},"contentHash":{"type":"string"},"signature":{"type":["string","null"],"description":"Null when the store signs its own orders (the platform can't sign for it)"},"signer":{"type":["string","null"]},"cid":{"type":["string","null"],"description":"IPFS CID of this envelope; invite-only stores are never pinned"},"uri":{"type":["string","null"]},"gatewayUrl":{"type":["string","null"]}},"required":["snapshot","contentHash","signature","signer"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/catalog/{version}":{"get":{"operationId":"getCatalogVersion","tags":["Discover"],"summary":"One published catalog version","description":"One published catalog version. Versions never change once published.\n\nAuth: Optional API key, scope `orders`.","x-audience":["buyer","merchant"],"x-scope":"orders","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"version","in":"path","required":true,"description":"Catalog snapshot version","schema":{"type":"integer"}}],"security":[{},{"apiKey":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/catalog/versions":{"get":{"operationId":"listCatalogVersions","tags":["Discover"],"summary":"Every published catalog version, newest first (up to 100): version, contentHash, signed, cid, product count, time","description":"Every published catalog version, newest first (up to 100): version, contentHash, signed, cid, product count, time.\n\nAuth: Optional API key, scope `orders`.","x-audience":["buyer","merchant"],"x-scope":"orders","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{},{"apiKey":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/directory":{"get":{"operationId":"listStoreDirectory","tags":["Discover"],"summary":"Stores that opted in to discovery, busiest first, with their handle, products on sale, lowest price and 30-day sales","description":"Stores that opted in to discovery, busiest first, with their handle, products on sale, lowest price and 30-day sales. Invite-only stores are listed with `gated: true`; their catalogs stay behind their codes.\n\nAuth: No auth.\n\nCached for 30 seconds. Use a listed store's chainId and storeId with its agent card and the other store endpoints.","x-audience":["buyer"],"parameters":[{"name":"chain","in":"query","required":false,"description":"Network slug, short name (\"base\") or chain id; omit for every network","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Search handle, name or tagline","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Most stores to return","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"stores":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryStore"}}},"required":["stores"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/handles/{ref}":{"get":{"operationId":"resolveHandle","tags":["Discover"],"summary":"The store behind cart.fun/@ref: a store handle, or a \"base-12\" style chain-and-id fallback for stores without one","description":"The store behind cart.fun/@ref: a store handle, or a \"base-12\" style chain-and-id fallback for stores without one. Returns its chainId, storeId and profile.\n\nAuth: No auth.\n\n404 when nothing is at that handle.","x-audience":["buyer","merchant"],"parameters":[{"name":"ref","in":"path","required":true,"description":"A store handle (without the @), or a chain-and-id fallback like base-12","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer"},"storeId":{"type":"integer"},"profile":{"oneOf":[{"$ref":"#/components/schemas/StoreProfile"},{"type":"null"}]}},"required":["chainId","storeId","profile"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/profile":{"get":{"operationId":"getStoreProfile","tags":["Discover"],"summary":"The store's public profile (handle, name, tagline, accent, directory listing), or null when it hasn't claimed a handle","description":"The store's public profile (handle, name, tagline, accent, directory listing), or null when it hasn't claimed a handle.\n\nAuth: No auth.","x-audience":["buyer","merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"oneOf":[{"$ref":"#/components/schemas/StoreProfile"},{"type":"null"}]}},"required":["profile"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"patch":{"operationId":"updateStoreProfile","tags":["Catalog"],"summary":"Claims or updates the store's handle (its cart.fun/@handle address), name, tagline, accent and directory listing","description":"Claims or updates the store's handle (its cart.fun/@handle address), name, tagline, accent and directory listing. Send every field.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).\n\n400 for an invalid or reserved handle; 409 when the handle is taken.","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreProfileInput"}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/StoreProfile"}},"required":["profile"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/reviews":{"get":{"operationId":"getStoreReviews","tags":["Discover"],"summary":"ERC-8004 reviews, each checked against the receipt it names, and the verified score","description":"ERC-8004 reviews, each checked against the receipt it names, and the verified score.\n\nAuth: No auth.","x-audience":["buyer"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/networks":{"get":{"operationId":"listNetworks","tags":["Discover"],"summary":"Every network's contracts and terms for opening a store: storeRegistry, checkout (address, version, escrow), platformSigner, paymentToken, activationFee (null = free), identityRegistry, plus receipts and carts","description":"Every network's contracts and terms for opening a store: storeRegistry, checkout (address, version, escrow), platformSigner, paymentToken, activationFee (null = free), identityRegistry, plus receipts and carts. Everything an agent needs to register a store itself.\n\nAuth: No auth.","x-audience":["merchant","buyer"],"parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/signer":{"get":{"operationId":"getSigner","tags":["Discover"],"summary":"The platform order signer","description":"The platform order signer. A store must register this address as its signer to get quotes.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"signer":{"type":"string","description":"0x-prefixed address","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/service-fee":{"get":{"operationId":"getServiceFee","tags":["Discover"],"summary":"The buyer service-fee policy on a network, to preview fees before quoting","description":"The buyer service-fee policy on a network, to preview fees before quoting. Null where the checkout can't charge one.\n\nAuth: No auth.","x-audience":["buyer"],"parameters":[{"name":"chainId","in":"query","required":true,"description":"e.g. 84532","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/summary":{"get":{"operationId":"getChainSummary","tags":["Discover"],"summary":"Sales totals per store on a network, from the public receipt index","description":"Sales totals per store on a network, from the public receipt index.\n\nAuth: No auth.","x-audience":["buyer","merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/orders":{"post":{"operationId":"createOrder","tags":["Buy"],"summary":"Prices the lines from the catalog and returns an order signed by the store","description":"Prices the lines from the catalog and returns an order signed by the store. The buyer then pays it on-chain (see the checkout flow). Quotes expire after 10 minutes and only `buyer` can fill them.\n\nAuth: Optional API key, scope `orders`.\n\nInvite-only stores need an API key with the orders scope. 402 means the store isn't activated for cart.fun orders. 409 means a stock-limited product doesn't have enough units left; a quote holds its units for 15 minutes. 400 covers per-order limits (maxPerOrder).","x-audience":["buyer"],"x-scope":"orders","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"security":[{},{"apiKey":[]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderQuote"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/receipts/{chain}/{id}":{"get":{"operationId":"getReceipt","tags":["Receipts & reviews"],"summary":"A receipt NFT's on-chain record: store, purchaser, holder, amount paid and lifecycle state","description":"A receipt NFT's on-chain record: store, purchaser, holder, amount paid and lifecycle state.\n\nAuth: No auth.","x-audience":["buyer","merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/receipts/{chain}/{id}/order":{"get":{"operationId":"getReceiptOrder","tags":["Receipts & reviews"],"summary":"The order behind a receipt, proven by its on-chain commitment","description":"The order behind a receipt, proven by its on-chain commitment. Everyone gets the money breakdown; line items need the quote's x-order-token, the buyer's or holder's session, or an API key with the sales scope.\n\nAuth: Optional API key, scope `sales`.\n\nOrders paid through CartCheckoutV4 also commit their lines on-chain. `linesHash` is public; whoever may see the lines also gets `linesPreimage`. To verify: keccak256 the UTF-8 bytes of `linesPreimage` and compare with `linesHash` (and with the `linesHash` in the receipt's `CheckoutCompleted` event). Its `catalog` field names the signed catalog snapshot the lines were priced from. V3 orders return `linesHash: null`.","x-audience":["buyer","merchant"],"x-scope":"sales","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[{},{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptOrder"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/receipts/{chain}/{id}/delivery":{"get":{"operationId":"getReceiptDelivery","tags":["Receipts & reviews"],"summary":"What the receipt's buyer unlocked: per line, the product's instructions, link and codes (each paid unit of a code product gets its own, assigned on first read and kept)","description":"What the receipt's buyer unlocked: per line, the product's instructions, link and codes (each paid unit of a code product gets its own, assigned on first read and kept). Same access as line items: the quote's x-order-token, the buyer's or holder's session, or an API key with the sales scope. Refunded and voided receipts unlock nothing.\n\nAuth: Optional API key, scope `sales`.","x-audience":["buyer","merchant"],"x-scope":"sales","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[{},{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","description":"full, summary (not allowed to see it) or none (no cart.fun order)"},"status":{"type":"string","description":"delivered, none (nothing digital), reversed (refunded or voided), locked or unknown"},"items":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"integer"},"name":{"type":"string"},"quantity":{"type":"integer"},"text":{"type":"string"},"url":{"type":"string"},"codes":{"type":"array","items":{"type":"string"}},"codesMissing":{"type":"integer"}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/receipts/{chain}/{id}/cart":{"get":{"operationId":"getReceiptCart","tags":["Receipts & reviews"],"summary":"The cart a receipt paid for, as it stands: its holder (and whether that's still the buyer), its ERC-6551 account, whether it's locked, and every on-chain item checkout packed into it with how much is still inside","description":"The cart a receipt paid for, as it stands: its holder (and whether that's still the buyer), its ERC-6551 account, whether it's locked, and every on-chain item checkout packed into it with how much is still inside.\n\nAuth: No auth.\n\nEverything here is public on-chain. 404 when the receipt doesn't exist.","x-audience":["buyer","merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string"},"cartId":{"type":["string","null"],"description":"Null when the receipt has no cart"},"account":{"type":["string","null"],"description":"The cart's ERC-6551 account, which holds its items"},"holder":{"type":["string","null"]},"heldByBuyer":{"type":"boolean"},"locked":{"type":"boolean","description":"The holder locked the account (e.g. while listing the cart)"},"packed":{"type":["array","null"],"description":"{ kind, token, id, amount, symbol, decimals, now } per packed item; `now` is how much is still in the account. Null when it can't be told"},"source":{"type":["string","null"],"description":"\"order\": cart.fun's order record, checked against the signed itemsHash; \"chain\": the checkout's ItemPacked events"}},"required":["receiptId","cartId","heldByBuyer","locked","packed","source"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/receipts/{chain}/{id}/svg":{"get":{"operationId":"getReceiptSvg","tags":["Receipts & reviews"],"summary":"The receipt's rendered image (SVG)","description":"The receipt's rendered image (SVG).\n\nAuth: No auth.","x-audience":["buyer"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/reviews/comment":{"get":{"operationId":"getReviewCommentLimits","tags":["Receipts & reviews"],"summary":"How long a review comment may be, and whether long ones can be pinned to IPFS here","description":"How long a review comment may be, and whether long ones can be pinned to IPFS here.\n\nAuth: No auth.","x-audience":["buyer"],"parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"pinReviewComment","tags":["Receipts & reviews"],"summary":"Pins a long review comment to IPFS and returns its ipfs:// URI and keccak256 hash for the review's feedback file","description":"Pins a long review comment to IPFS and returns its ipfs:// URI and keccak256 hash for the review's feedback file.\n\nAuth: No auth.\n\n10 pins per client per hour.","x-audience":["buyer"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer"},"receiptId":{"type":"string","description":"The receipt being reviewed","pattern":"^\\d+$"},"text":{"type":"string"}},"required":["chainId","receiptId","text"]}}}},"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"uri":{"type":"string"},"hash":{"type":"string"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/products/{sku}":{"patch":{"operationId":"updateProduct","tags":["Catalog"],"summary":"Updates the fields sent; omitted fields (and the sku) stay","description":"Updates the fields sent; omitted fields (and the sku) stay.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductInput"}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"delete":{"operationId":"deleteProduct","tags":["Catalog"],"summary":"Deletes a product","description":"Deletes a product.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/products/order":{"post":{"operationId":"reorderProducts","tags":["Catalog"],"summary":"Sets the catalog's display order","description":"Sets the catalog's display order. List every sku once; the vending machine stocks the first 12 on sale.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skus":{"type":"array","items":{"type":"integer","description":"Product sku"}}},"required":["skus"]}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/products/{sku}/image":{"get":{"operationId":"getProductImage","tags":["Catalog"],"summary":"Returns the product's image bytes","description":"Returns the product's image bytes. Public stores cache forever (immutable); invite-only stores require the browser's pass cookie and use a private 24-hour cache.\n\nAuth: No auth.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["buyer","merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"put":{"operationId":"putProductImage","tags":["Catalog"],"summary":"Sets a product's image","description":"Sets a product's image. Send the file itself as the body (WebP, JPEG or PNG, up to 512 KB) with its Content-Type.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"delete":{"operationId":"deleteProductImage","tags":["Catalog"],"summary":"Removes a product's image","description":"Removes a product's image.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/products/{sku}/delivery":{"get":{"operationId":"getProductDelivery","tags":["Catalog"],"summary":"The product's digital delivery: instructions (text) and a link every buyer unlocks after paying, and its code pool's counts","description":"The product's digital delivery: instructions (text) and a link every buyer unlocks after paying, and its code pool's counts. Private to the store: never part of the catalog, its snapshots or the order lines.\n\nAuth: API key or owner session, scope `catalog`.","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"delivery":{"type":"object","properties":{"text":{"type":"string","description":"Instructions every buyer sees"},"url":{"type":"string","description":"A link every buyer gets"},"codes":{"type":"object","properties":{"total":{"type":"integer"},"assigned":{"type":"integer"},"free":{"type":"integer"}}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"put":{"operationId":"setProductDelivery","tags":["Catalog"],"summary":"Sets the product's delivery instructions and/or link (fields sent; an empty string clears one)","description":"Sets the product's delivery instructions and/or link (fields sent; an empty string clears one). Links must be http(s).\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Up to 2000 characters"},"url":{"type":"string","description":"An http(s) link, up to 2000 characters"}}}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"delivery":{"type":"object","properties":{"text":{"type":"string","description":"Instructions every buyer sees"},"url":{"type":"string","description":"A link every buyer gets"},"codes":{"type":"object","properties":{"total":{"type":"integer"},"assigned":{"type":"integer"},"free":{"type":"integer"}}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/products/{sku}/delivery/codes":{"get":{"operationId":"listDeliveryCodes","tags":["Catalog"],"summary":"The product's code pool, newest first, with the receipt each assigned code went to","description":"The product's code pool, newest first, with the receipt each assigned code went to.\n\nAuth: API key or owner session, scope `catalog`.","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"assigned":{"type":"boolean"},"receiptId":{"type":"string","description":"Null until assigned and linked"}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"addDeliveryCodes","tags":["Catalog"],"summary":"Adds codes (license keys, invite codes…) to the product's pool, up to 1000 per call; ones already there are skipped","description":"Adds codes (license keys, invite codes…) to the product's pool, up to 1000 per call; ones already there are skipped. Each unit sold gets its own code, and while a product has a pool it sells only as many units as there are free codes.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string","description":"1–200 characters"}}},"required":["codes"]}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"},"skipped":{"type":"integer"},"settings":{"type":"object","properties":{"text":{"type":"string","description":"Instructions every buyer sees"},"url":{"type":"string","description":"A link every buyer gets"},"codes":{"type":"object","properties":{"total":{"type":"integer"},"assigned":{"type":"integer"},"free":{"type":"integer"}}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"delete":{"operationId":"removeDeliveryCodes","tags":["Catalog"],"summary":"Removes unassigned codes: the ones listed, or every unassigned one with { all: true }","description":"Removes unassigned codes: the ones listed, or every unassigned one with { all: true }. Assigned codes belong to their buyers and stay.\n\nAuth: API key or owner session, scope `catalog`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"catalog","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"sku","in":"path","required":true,"description":"Product sku","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"}},"all":{"type":"boolean","description":"Remove every unassigned code"}}}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"integer"},"settings":{"type":"object","properties":{"text":{"type":"string","description":"Instructions every buyer sees"},"url":{"type":"string","description":"A link every buyer gets"},"codes":{"type":"object","properties":{"total":{"type":"integer"},"assigned":{"type":"integer"},"free":{"type":"integer"}}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/treasury-nfts":{"get":{"operationId":"listTreasuryNfts","tags":["Catalog"],"summary":"The ERC-721 and ERC-1155 tokens the store's treasury holds, grouped by collection, from the network's block explorer","description":"The ERC-721 and ERC-1155 tokens the store's treasury holds, grouped by collection, from the network's block explorer. For picking what to list; listing still checks holdings on-chain. cart.fun receipts, carts and the store's agent identity are left out. Public: holdings are on-chain.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/sales":{"get":{"operationId":"listSales","tags":["Sales"],"summary":"Every receipt the store has printed, newest first","description":"Every receipt the store has printed, newest first. Public: receipts are on-chain.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/sales/refresh":{"post":{"operationId":"refreshSales","tags":["Sales"],"summary":"Re-reads up to 50 of the store's receipts from chain now, after a redeem, refund or void lands","description":"Re-reads up to 50 of the store's receipts from chain now, after a redeem, refund or void lands.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":"Receipt id","pattern":"^\\d+$"}}},"required":["ids"]}}}},"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/actions":{"get":{"operationId":"listActions","tags":["Sales"],"summary":"The store's refund, void and redeem log, with reasons and notes","description":"The store's refund, void and redeem log, with reasons and notes.\n\nAuth: API key or owner session, scope `sales`.","x-audience":["merchant"],"x-scope":"sales","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"logActions","tags":["Sales"],"summary":"Logs refunds, voids or redemptions you just sent on-chain, attributed to your key","description":"Logs refunds, voids or redemptions you just sent on-chain, attributed to your key.\n\nAuth: API key or owner session, scope `sales`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"sales","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionInput"}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/invites":{"get":{"operationId":"listInvites","tags":["Invites"],"summary":"The store's invite codes","description":"The store's invite codes. While a store has any, it's invite-only.\n\nAuth: API key or owner session, scope `invites`.","x-audience":["merchant"],"x-scope":"invites","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"createInvite","tags":["Invites"],"summary":"Creates an invite code (generated when `code` is omitted)","description":"Creates an invite code (generated when `code` is omitted).\n\nAuth: API key or owner session, scope `invites`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"invites","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInput"}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"201":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/invites/{code}":{"patch":{"operationId":"updateInvite","tags":["Invites"],"summary":"Changes an invite's label, use limit, expiry or active flag","description":"Changes an invite's label, use limit, expiry or active flag.\n\nAuth: API key or owner session, scope `invites`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"invites","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"code","in":"path","required":true,"description":"6-digit invite code","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInput"}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"delete":{"operationId":"deleteInvite","tags":["Invites"],"summary":"Deletes an invite code","description":"Deletes an invite code. Deleting every code makes the store public.\n\nAuth: API key or owner session, scope `invites`.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"x-scope":"invites","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"code","in":"path","required":true,"description":"6-digit invite code","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/access":{"get":{"operationId":"checkStoreAccess","tags":["Invites"],"summary":"Returns whether this browser holds a valid pass for the store (`ok`) and whether the store is invite-only (`gated`)","description":"Returns whether this browser holds a valid pass for the store (`ok`) and whether the store is invite-only (`gated`). Use before showing the code prompt.\n\nAuth: No auth.","x-audience":["buyer"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"True if the browser's pass cookie is valid for this store"},"gated":{"type":"boolean","description":"True if the store requires an invite code"}},"required":["ok","gated"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"redeemAccessCode","tags":["Invites"],"summary":"Checks an invite code for a browser and sets a 30-day pass cookie","description":"Checks an invite code for a browser and sets a 30-day pass cookie. Agents should use an API key with the orders scope instead.\n\nAuth: No auth.\n\n8 wrong guesses per client and store per 10 minutes.","x-audience":["buyer"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"]}}}},"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/webhooks":{"get":{"operationId":"listWebhooks","tags":["Webhooks"],"summary":"The store's webhook endpoints and its 50 latest deliveries","description":"The store's webhook endpoints and its 50 latest deliveries.\n\nAuth: API key or owner session, scope `webhooks`.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"createWebhook","tags":["Webhooks"],"summary":"Adds an endpoint","description":"Adds an endpoint. The response carries its signing secret, shown this once.\n\nAuth: API key or owner session, scope `webhooks`.\n\nNeeds the store's cart.fun activation (402 otherwise).\n\n20 new endpoints per store per hour.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string","description":"Up to 120 characters"},"events":{"type":"array","items":{"type":"string"},"description":"Omit or empty for every event"}},"required":["url"]}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string","description":"whsec_…, for verifying signatures"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/webhooks/{id}":{"get":{"operationId":"listWebhookDeliveries","tags":["Webhooks"],"summary":"One endpoint's 50 latest deliveries","description":"One endpoint's 50 latest deliveries.\n\nAuth: API key or owner session, scope `webhooks`.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"patch":{"operationId":"updateWebhook","tags":["Webhooks"],"summary":"Changes an endpoint's URL, description, events or active flag, or rotates its secret (the new one comes back once)","description":"Changes an endpoint's URL, description, events or active flag, or rotates its secret (the new one comes back once).\n\nAuth: API key or owner session, scope `webhooks`.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"rotateSecret":{"type":"boolean"}}}}}},"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"delete":{"operationId":"deleteWebhook","tags":["Webhooks"],"summary":"Deletes an endpoint and its delivery history","description":"Deletes an endpoint and its delivery history.\n\nAuth: API key or owner session, scope `webhooks`.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/webhooks/{id}/test":{"post":{"operationId":"testWebhook","tags":["Webhooks"],"summary":"Sends a `ping` event to the endpoint now","description":"Sends a `ping` event to the endpoint now.\n\nAuth: API key or owner session, scope `webhooks`.\n\n10 per endpoint per 10 minutes.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/webhooks/deliveries/{deliveryId}/retry":{"post":{"operationId":"retryWebhookDelivery","tags":["Webhooks"],"summary":"Sends a delivery again now, whatever happened to it before","description":"Sends a delivery again now, whatever happened to it before.\n\nAuth: API key or owner session, scope `webhooks`.\n\n60 per store per 10 minutes.","x-audience":["merchant"],"x-scope":"webhooks","parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"deliveryId","in":"path","required":true,"description":"Webhook delivery id","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/keys":{"get":{"operationId":"listKeys","tags":["Keys & activation"],"summary":"The store's API keys (never their secrets)","description":"The store's API keys (never their secrets). Key management always takes the owner's wallet session.\n\nAuth: Owner wallet session.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[{"walletSession":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"createKey","tags":["Keys & activation"],"summary":"Creates a key","description":"Creates a key. The response carries the secret, the only time it's returned.\n\nAuth: Owner wallet session.\n\nNeeds the store's cart.fun activation (402 otherwise).","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 60 characters"},"scopes":{"type":"array","items":{"type":"string","enum":["orders","catalog","sales","invites","webhooks"]}}},"required":["name","scopes"]}}}},"security":[{"walletSession":[]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ApiKey"},"secret":{"type":"string","description":"cf_sk_…"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/keys/{id}":{"delete":{"operationId":"revokeKey","tags":["Keys & activation"],"summary":"Revokes a key at once","description":"Revokes a key at once.\n\nAuth: Owner wallet session.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}},{"name":"id","in":"path","required":true,"description":"Receipt id, webhook endpoint id or key id, depending on the route","schema":{"type":"string"}}],"security":[{"walletSession":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks the scope, or is for another store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/api/v1/stores/{chain}/{storeId}/activation":{"get":{"operationId":"getActivation","tags":["Keys & activation"],"summary":"Whether the store is activated for cart.fun orders, and the fee to activate it","description":"Whether the store is activated for cart.fun orders, and the fee to activate it.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}},"post":{"operationId":"activateStore","tags":["Keys & activation"],"summary":"Activates the store from its fee payment","description":"Activates the store from its fee payment. The payment must come from the store's owner or treasury.\n\nAuth: No auth.","x-audience":["merchant"],"parameters":[{"name":"chain","in":"path","required":true,"description":"Network slug or chain id: base-sepolia (84532), robinhood-testnet (46630), arc-testnet (5042002)","schema":{"type":"string"}},{"name":"storeId","in":"path","required":true,"description":"Store id in the StoreRegistry (1–65535)","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","description":"The fee payment transaction"}},"required":["txHash"]}}}},"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, written for a person"}},"required":["error"]},"OnchainUnit":{"type":"object","properties":{"kind":{"type":"integer","description":"0 = ERC-20, 1 = ERC-721, 2 = ERC-1155","enum":[0,1,2]},"token":{"type":"string","description":"0x-prefixed address","pattern":"^0x[0-9a-fA-F]{40}$"},"id":{"type":"string","description":"ERC-1155 token id; \"0\" for ERC-20 and ERC-721","pattern":"^\\d+$"},"amount":{"type":"string","description":"Base units packed into the buyer's cart per unit sold; \"1\" for ERC-721","pattern":"^\\d+$"},"ids":{"type":"array","items":{"type":"string","description":"Token id","pattern":"^\\d+$"},"description":"ERC-721 only: the token ids the product sells (up to 200). Each unit sold packs one the store's treasury owns and hasn't promised to another open quote, chosen when the order is quoted"}},"required":["kind","token","id","amount"],"description":"Tokens delivered into the buyer's cart NFT with each unit"},"Product":{"type":"object","properties":{"sku":{"type":"integer","description":"1–9999"},"name":{"type":"string"},"type":{"type":"string","description":"Free-form category, e.g. Merch, Digital, Service"},"price":{"type":"string","description":"Decimal price in the store's payment token, up to 6 decimals, e.g. \"12.50\""},"active":{"type":"boolean","description":"Hidden products (false) can't be quoted and only show to the merchant"},"onchain":{"oneOf":[{"$ref":"#/components/schemas/OnchainUnit"},{"type":"null"}],"description":"Null = off-chain goods: paid for and receipted only"},"description":{"type":"string","description":"Shown on the storefront's product card; up to 280 characters, \"\" for none"},"maxPerOrder":{"type":["integer","null"],"description":"Most units one order may hold (1–99); null = no limit"},"stock":{"type":["integer","null"],"description":"Units it may sell in all; null = unlimited"},"available":{"type":["integer","null"],"description":"Units left: stock minus units sold (refunds and voids give them back) and units held by quotes from the last 15 minutes. Null with unlimited stock"},"sold":{"type":"integer","description":"Units sold in paid, unreversed orders. Merchant reads only"},"position":{"type":"integer","description":"Display order, lowest first (then sku). The storefront's vending machine stocks the first 12 on sale"},"image":{"type":["string","null"],"description":"Image URL path (versioned, cacheable), or null"},"updatedAt":{"type":"string","format":"date-time"}},"required":["sku","name","type","price","active","onchain","description","maxPerOrder","stock","available","position","image"]},"ProductInput":{"type":"object","properties":{"sku":{"type":"integer","description":"Optional on create: the next free sku is used. 1–9999"},"name":{"type":"string","description":"Up to 60 characters"},"type":{"type":"string","description":"Up to 24 characters"},"price":{"type":"string","description":"Decimal string, up to 6 decimals"},"active":{"type":"boolean"},"onchain":{"oneOf":[{"$ref":"#/components/schemas/OnchainUnit"},{"type":"null"}]},"description":{"type":"string","description":"Optional, up to 280 characters"},"maxPerOrder":{"type":["integer","null"],"description":"Optional, 1–99; null = no limit"},"stock":{"type":["integer","null"],"description":"Optional, 0–1000000; null = unlimited"}},"required":["name","type","price","active"]},"OrderRequest":{"type":"object","properties":{"chainId":{"type":"integer","description":"e.g. 84532"},"storeId":{"type":"integer","description":"The store to buy from"},"buyer":{"type":"string","description":"The wallet that will pay. Only it can fill the quote","pattern":"^0x[0-9a-fA-F]{40}$"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Product sku"},"quantity":{"type":"integer","description":"1 or more"}},"required":["id","quantity"]}}},"required":["chainId","storeId","buyer","lines"]},"OrderQuote":{"type":"object","properties":{"chainId":{"type":"integer"},"version":{"type":"integer","description":"The checkout contract version the order is signed for: 3 = CartCheckoutV3, 4 = CartCheckoutV4. Picks the Order struct and ABI to call with","enum":[3,4]},"checkout":{"type":"string","description":"CartCheckoutV3 or V4 contract to call, and the spender to approve","pattern":"^0x[0-9a-fA-F]{40}$"},"order":{"type":"object","properties":{"storeId":{"type":"integer"},"buyer":{"type":"string","description":"0x-prefixed address","pattern":"^0x[0-9a-fA-F]{40}$"},"paymentToken":{"type":"string","description":"0x-prefixed address","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string","description":"Subtotal in base units","pattern":"^\\d+$"},"serviceFee":{"type":"string","description":"Buyer service fee in base units, paid on top of amount","pattern":"^\\d+$"},"itemsHash":{"type":"string","description":"keccak256 of the ABI-encoded items"},"nonce":{"type":"string","description":"Single-use","pattern":"^\\d+$"},"deadline":{"type":"string","description":"Unix seconds; the quote expires after this","pattern":"^\\d+$"},"escrowHold":{"type":"integer","description":"Seconds the store's payout is held in escrow; 0 = paid at once"},"relayFee":{"type":"string","description":"Gasless checkouts only; 0 in quotes from this endpoint","pattern":"^\\d+$"},"linesHash":{"type":"string","description":"CartCheckoutV4 only: keccak256 of the order's line items, signed and bound into the receipt's commitment. Part of the Order struct you pass to checkout()","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["storeId","buyer","paymentToken","amount","serviceFee","itemsHash","nonce","deadline","escrowHold","relayFee"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/OnchainUnit"},"description":"Pass to checkout() exactly as given"},"signature":{"type":"string","description":"The store signer's EIP-712 signature over the order"},"viewToken":{"type":"string","description":"Send as x-order-token to read this order's line items later"}},"required":["chainId","version","checkout","order","items","signature"]},"ReceiptOrder":{"type":"object","properties":{"order":{"type":["object","null"],"description":"The money breakdown. Null when cart.fun never quoted this receipt's order","properties":{"paymentToken":{"type":"string","description":"0x-prefixed address","pattern":"^0x[0-9a-fA-F]{40}$"},"subtotal":{"type":"string","description":"Base units","pattern":"^\\d+$"},"serviceFee":{"type":"string","description":"Base units","pattern":"^\\d+$"},"relayFee":{"type":"string","description":"Base units","pattern":"^\\d+$"},"total":{"type":"string","description":"subtotal + serviceFee + relayFee, base units","pattern":"^\\d+$"},"escrowHold":{"type":"integer","description":"Seconds the store's payout was held in escrow; 0 = paid at once"},"itemCount":{"type":"integer","description":"Units across all lines"},"cartId":{"type":["string","null"]}}},"lines":{"type":["array","null"],"description":"Line items (sku, name, type, price, quantity, tokenIds for ERC-721 lines). Null unless you may see them"},"access":{"type":"string","description":"\"full\" (lines included), \"summary\" (money only) or \"none\" (no order on record)","enum":["full","summary","none"]},"checkoutVersion":{"type":"integer","description":"3 or 4: the CartCheckout version the order was paid through","enum":[3,4]},"linesHash":{"type":["string","null"],"description":"CartCheckoutV4 orders: keccak256 of linesPreimage. Public: it's in the receipt's commitment and the CheckoutCompleted event. Null on V3 orders"},"linesPreimage":{"type":["string","null"],"description":"V4 orders, when you may see the lines: the exact canonical JSON (keys sorted, no whitespace) that hashes to linesHash. Schema cartfun.lines/v1: { schema, salt, catalog: { version, contentHash } | null, lines[] }. `catalog` names the signed catalog snapshot the lines were priced from (GET …/catalog/{version})"}},"required":["access"]},"StoreProfile":{"type":"object","properties":{"chainId":{"type":"integer"},"storeId":{"type":"integer"},"handle":{"type":"string","description":"Lowercase, 3–24 characters (a–z, 0–9, - and _), unique across every network. The store lives at cart.fun/@handle","pattern":"^[a-z0-9][a-z0-9_-]*[a-z0-9]$"},"name":{"type":"string","description":"Up to 40 characters"},"tagline":{"type":"string","description":"Up to 120 characters, \"\" for none"},"accent":{"type":"string","description":"One of the store's accent colors as a hex string (#F94144, #F3722C, #F8961E, #F9C74F, #90BE6D, #43AA8B, #4D908E, #577590, #277DA1), or \"\" for the default"},"listed":{"type":"boolean","description":"Opted in to the /stores directory"},"updatedAt":{"type":"string","format":"date-time"}},"required":["chainId","storeId","handle","name","tagline","accent","listed"]},"StoreProfileInput":{"type":"object","properties":{"handle":{"type":"string","description":"3–24 characters: a–z, 0–9, - and _, starting and ending with a letter or number. Brand names and \"base-12\" style refs are reserved"},"name":{"type":"string","description":"Required, up to 40 characters"},"tagline":{"type":"string","description":"Up to 120 characters, \"\" for none"},"accent":{"type":"string","description":"One of the accent colors, or \"\""},"listed":{"type":"boolean","description":"Show the store in the /stores directory"}},"required":["handle","name","tagline","accent","listed"]},"DirectoryStore":{"allOf":[{"$ref":"#/components/schemas/StoreProfile"},{"type":"object","properties":{"products":{"type":"integer","description":"Products on sale"},"fromPrice":{"type":["string","null"],"description":"Lowest on-sale price, decimal, or null with nothing on sale"},"sales30d":{"type":"integer","description":"Receipts in the last 30 days"},"gated":{"type":"boolean","description":"Invite-only: its catalog stays behind its codes"}},"required":["products","fromPrice","sales30d","gated"]}]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Public https URL; private and loopback addresses are refused"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string"},"description":"Subscribed event types; empty = every event"},"active":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"consecutiveFailures":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","active"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"lastAttemptAt":{"type":["string","null"],"format":"date-time"},"lastStatus":{"type":["integer","null"]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}},"WebhookEnvelope":{"type":"object","properties":{"id":{"type":"string","description":"Event id. Deliveries can repeat: dedupe on it"},"type":{"type":"string","enum":["order.quoted","order.paid","receipt.refunded","receipt.voided","receipt.redeemed","receipt.transferred","receipt.serviced","review.created","review.replied","ping"]},"created":{"type":"string","format":"date-time"},"chainId":{"type":"integer"},"storeId":{"type":"integer"},"data":{"type":"object","description":"Event-specific payload"}},"required":["id","type","created","chainId","storeId","data"],"description":"The JSON body of every webhook POST, signed in the cartfun-signature header"},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","description":"First characters of the key, e.g. \"cf_sk_Ab12Cd34\""},"scopes":{"type":"array","items":{"type":"string","enum":["orders","catalog","sales","invites","webhooks"]}},"createdBy":{"type":"string","description":"0x-prefixed address","pattern":"^0x[0-9a-fA-F]{40}$"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"}}},"InviteInput":{"type":"object","properties":{"code":{"type":"string","description":"Exactly 6 digits; omit to generate one","pattern":"^\\d{6}$"},"label":{"type":"string"},"maxUses":{"type":["integer","null"],"description":"Null = unlimited"},"expiresAt":{"type":["string","null"],"format":"date-time"},"active":{"type":"boolean"}}},"ActionInput":{"type":"object","properties":{"receiptIds":{"type":"array","items":{"type":"string","description":"Receipt id","pattern":"^\\d+$"},"description":"1–100 receipts the action was just sent on-chain for"},"action":{"type":"string","enum":["redeem","refund","void"]},"reason":{"type":"string","description":"Required for refund (Customer request, Item unavailable, Damaged or defective, Wrong item, Duplicate order, Other) and void (Cashier error, Duplicate order, Cancelled before fulfilment, Suspected fraud, Other). Max 60 characters"},"note":{"type":"string","description":"Private merchant note"},"refundAmounts":{"type":"array","items":{"type":["string","null"]},"description":"Per receipt, in receiptIds order; decimal payout or null"}},"required":["receiptIds","action"]}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A store API key (cf_sk_…), made by the store owner in the dashboard's Developers tab. Scopes: orders, catalog, sales, invites, webhooks."},"walletSession":{"type":"apiKey","in":"header","name":"Authorization","description":"\"CartSig <base64 JSON {message, signature}>\": the store owner's signed cart.fun session message. Its Origin line must be the origin you call. Needed only to manage API keys; use an API key for everything else."}}}}