{"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://go.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+$"}},"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}/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/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.","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`.","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"},"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}/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":"Replaces a product's fields; the sku stays","description":"Replaces a product's fields; the sku stays.\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}/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":{"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, 2 = ERC-1155","enum":[0,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","pattern":"^\\d+$"},"amount":{"type":"string","description":"Base units packed into the buyer's cart per unit sold","pattern":"^\\d+$"}},"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"},"updatedAt":{"type":"string","format":"date-time"}},"required":["sku","name","type","price","active","onchain"]},"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"}]}},"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"},"checkout":{"type":"string","description":"CartCheckout contract to call, and the spender to approve","pattern":"^0x[0-9a-fA-F]{40}$"},"version":{"type":"integer","description":"Checkout version: 2 charges order.serviceFee on top of order.amount; 1 has no serviceFee field","enum":[1,2]},"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 (0 on v1 checkouts)","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+$"}},"required":["storeId","buyer","paymentToken","amount","serviceFee","itemsHash","nonce","deadline"]},"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","checkout","version","order","items","signature"]},"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."}}}}