go.cart.fun
cart.fun for agents
Stores sell for stablecoins on-chain, and every sale prints a receipt NFT. Point an agent here and it can discover stores, quote and pay orders, verify receipts, or run a store's catalog, invites, sales log and webhooks.
Read https://go.cart.fun/llms.txt and follow its links to learn the cart.fun API, then help me with my task.
Machine-readable
- /llms.txtThe short index. Point any LLM here first.
- /llms-full.txtThe whole guide in one file: workflows, auth, webhooks, every endpoint.
- /openapi.jsonOpenAPI 3.1 spec, for codegen and tool-calling frameworks.
- /skill.mdAn Agent Skill (SKILL.md) for Claude Code and other skill-aware agents.
- /api/v1/stores/base-sepolia/3/agentA live store's ERC-8004 agent card, with its orderable catalog.
Install the skill in Claude Code
mkdir -p ~/.claude/skills/cartfun && curl -fsSL https://go.cart.fun/skill.md -o ~/.claude/skills/cartfun/SKILL.md
An MCP server is next, at https://go.cart.fun/mcp.
Workflows
Buy
- Read the store's agent card:
cartfun.commercehas the payment token, checkout contract and products. POST /api/v1/ordersfor a quote signed by the store (valid 10 minutes, for one buyer).- Approve
amount + serviceFeeto the checkout, then callcheckout(order, items, recipient, signature). - Read the receipt at
/api/v1/receipts/{chain}/{id}.
Sell
- The store owner creates an API key (
cf_sk_…) in the dashboard's Developers tab. - Manage products, invites and the refund/void/redeem log with it.
- Add a webhook endpoint and verify each delivery's signature.
- Each key gets 120 requests a minute; honour
Retry-Afteron 429.
Networks: Base Sepolia (base-sepolia, 84532) · Robinhood Chain Testnet (robinhood-testnet, 46630) · Arc Testnet (arc-testnet, 5042002). Full walkthrough with code in llms-full.txt.
Key scopes
orders- Get quotes from, and read the catalog of, this store even while it's invite-only (agents, checkout servers)
catalog- Read every product (hidden ones too) and create, edit and delete products
sales- Read the refund/void/redeem log, log new actions, and see receipts' line items
invites- List, create, edit and delete invite codes
webhooks- Manage webhook endpoints, send test events and see deliveries
Endpoints
Discover
- GET
/api/v1/stores/{chain}/{storeId}/agentNo authThe 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. - GET
/api/v1/stores/{chain}/{storeId}/productsOptional API key (orders)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. - GET
/api/v1/stores/{chain}/{storeId}/reviewsNo authERC-8004 reviews, each checked against the receipt it names, and the verified score. - GET
/api/v1/signerNo authThe platform order signer. A store must register this address as its signer to get quotes. - GET
/api/v1/service-feeNo authThe buyer service-fee policy on a network, to preview fees before quoting. Null where the checkout can't charge one. - GET
/api/v1/stores/{chain}/summaryNo authSales totals per store on a network, from the public receipt index.
Buy
- POST
/api/v1/ordersOptional API key (orders)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.
Receipts & reviews
- GET
/api/v1/receipts/{chain}/{id}No authA receipt NFT's on-chain record: store, purchaser, holder, amount paid and lifecycle state. - GET
/api/v1/receipts/{chain}/{id}/orderOptional API key (sales)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. - GET
/api/v1/receipts/{chain}/{id}/svgNo authThe receipt's rendered image (SVG). - GET
/api/v1/reviews/commentNo authHow long a review comment may be, and whether long ones can be pinned to IPFS here. - POST
/api/v1/reviews/commentNo authPins a long review comment to IPFS and returns its ipfs:// URI and keccak256 hash for the review's feedback file.
Catalog
- POST
/api/v1/stores/{chain}/{storeId}/productsAPI key or owner session (catalog)Creates products. Rejects the whole batch if any sku is taken. - PATCH
/api/v1/stores/{chain}/{storeId}/products/{sku}API key or owner session (catalog)Replaces a product's fields; the sku stays. - DELETE
/api/v1/stores/{chain}/{storeId}/products/{sku}API key or owner session (catalog)Deletes a product.
Sales
- GET
/api/v1/stores/{chain}/{storeId}/salesNo authEvery receipt the store has printed, newest first. Public: receipts are on-chain. - POST
/api/v1/stores/{chain}/{storeId}/sales/refreshNo authRe-reads up to 50 of the store's receipts from chain now, after a redeem, refund or void lands. - GET
/api/v1/stores/{chain}/{storeId}/actionsAPI key or owner session (sales)The store's refund, void and redeem log, with reasons and notes. - POST
/api/v1/stores/{chain}/{storeId}/actionsAPI key or owner session (sales)Logs refunds, voids or redemptions you just sent on-chain, attributed to your key.
Invites
- GET
/api/v1/stores/{chain}/{storeId}/invitesAPI key or owner session (invites)The store's invite codes. While a store has any, it's invite-only. - POST
/api/v1/stores/{chain}/{storeId}/invitesAPI key or owner session (invites)Creates an invite code (generated when `code` is omitted). - PATCH
/api/v1/stores/{chain}/{storeId}/invites/{code}API key or owner session (invites)Changes an invite's label, use limit, expiry or active flag. - DELETE
/api/v1/stores/{chain}/{storeId}/invites/{code}API key or owner session (invites)Deletes an invite code. Deleting every code makes the store public. - POST
/api/v1/stores/{chain}/{storeId}/accessNo authChecks an invite code for a browser and sets a 30-day pass cookie. Agents should use an API key with the orders scope instead.
Webhooks
- GET
/api/v1/stores/{chain}/{storeId}/webhooksAPI key or owner session (webhooks)The store's webhook endpoints and its 50 latest deliveries. - POST
/api/v1/stores/{chain}/{storeId}/webhooksAPI key or owner session (webhooks)Adds an endpoint. The response carries its signing secret, shown this once. - GET
/api/v1/stores/{chain}/{storeId}/webhooks/{id}API key or owner session (webhooks)One endpoint's 50 latest deliveries. - PATCH
/api/v1/stores/{chain}/{storeId}/webhooks/{id}API key or owner session (webhooks)Changes an endpoint's URL, description, events or active flag, or rotates its secret (the new one comes back once). - DELETE
/api/v1/stores/{chain}/{storeId}/webhooks/{id}API key or owner session (webhooks)Deletes an endpoint and its delivery history. - POST
/api/v1/stores/{chain}/{storeId}/webhooks/{id}/testAPI key or owner session (webhooks)Sends a `ping` event to the endpoint now. - POST
/api/v1/stores/{chain}/{storeId}/webhooks/deliveries/{deliveryId}/retryAPI key or owner session (webhooks)Sends a delivery again now, whatever happened to it before.
Keys & activation
- GET
/api/v1/stores/{chain}/{storeId}/keysOwner wallet sessionThe store's API keys (never their secrets). Key management always takes the owner's wallet session. - POST
/api/v1/stores/{chain}/{storeId}/keysOwner wallet sessionCreates a key. The response carries the secret, the only time it's returned. - DELETE
/api/v1/stores/{chain}/{storeId}/keys/{id}Owner wallet sessionRevokes a key at once. - GET
/api/v1/stores/{chain}/{storeId}/activationNo authWhether the store is activated for cart.fun orders, and the fee to activate it. - POST
/api/v1/stores/{chain}/{storeId}/activationNo authActivates the store from its fee payment. The payment must come from the store's owner or treasury. - POST
/api/v1/stores/{chain}/{storeId}/agentNo authLinks 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.
Webhook events
order.quoted- cart.fun signed a quote from your catalog (before payment)
order.paid- A receipt was printed: the order is paid. Includes the order's items when cart.fun quoted it
receipt.refunded- A receipt was marked refunded
receipt.voided- A receipt was voided
receipt.redeemed- A receipt was redeemed (picked up or used)
receipt.transferred- A receipt's warranty moved to a new holder
receipt.serviced- A service record was added to a receipt
review.created- A buyer reviewed your store (ERC-8004), with whether it checked out against their receipt
review.replied- Your store replied to a review