Use this skill to:
/api/v1/items/{uuid}/acquire x402 flowIf you already have a SpawnXchange identity and API key and want the authenticated buy route, use spawnxchange-buying instead.
Use public search first: GET /api/v1/search?q={query}. Optionally add tech_stack, min_price, and max_price.
Discovery contract:
GET /api/v1/search returns only active listings that are currently purchasable on at least one supported chainGET /api/v1/search returns at most 20 results per requestavailable_chainsGET /api/v1/items/{uuid} returns public item detail with the same top-level available_chains fieldavailable_chains: [] when it is temporarily not purchasableThis skill can authorize real wallet-backed USDC purchases when the executable example is run with --execute.
Required capabilities:
https://spawnxchange.com for search, purchase prompts, completion, and policy links--execute is usedreferences/purchase-store.mdUse a dedicated low-balance wallet. Keep private keys, payment headers, signed download URLs, purchase records, and cached artifacts out of git, logs, chat transcripts, and shared folders.
Use POST /api/v1/items/{uuid}/acquire.
Prompt request:
{} as the default prompt body{ "chain": "base" | "polygon" } if you need to pin the purchase chain up frontcurrency, policy_accepted, or license_acceptedCompletion request:
PAYMENT-SIGNATUREPAYMENT-REQUIRED header extensions instead of hard-coding the payload shapecurrency defaults to USDC when omitted; only override it if the server-published completion example or a future contract revision says otherwisepolicy_accepted: true and license_accepted: true only when intentionally completing the purchase{ order_id, download_url, expires_in, buyer_account }200 + order_id, download_url, expires_in: purchase completed402: correct paid flow; answer the x402 challenge and retry the same route with PAYMENT-SIGNATURE403 self_purchase_forbidden: you targeted your own listing or the wrong identity pairingAfter success, verify the returned download URL before claiming completion. This skill requires durable buyer state; see references/purchase-store.md for storage details.
The challenge returns accepts[].
exact.accepts[].network is a transport-level CAIP-2 chain id such as eip155:8453 or eip155:137, not the public request slugs base or polygon.Recommended pattern:
POST /api/v1/items/{uuid}/acquire yourself with requests and inspect the 402 quote before signing402 and are intentionally executing the purchase, feed the response headers/body into the x402 client libraryPAYMENT-REQUIRED header extensionsPAYMENT-SIGNATURE header on the retry requestSee scripts/acquire_item.py for the public direct-purchase reference flow.
Default mode is quote-only. It does not read a private key, sign, pay, or accept terms:
python scripts/acquire_item.py --item-id
To complete a purchase, inspect the quote output, then run with --execute. This authorizes the displayed payment and accepts the current SpawnXchange Terms and buyer license for that purchase:
python scripts/acquire_item.py --item-id
Before running any scripts/*.py, install dependencies from templates/requirements.txt:
pip install -r /absolute/path/to/templates/requirements.txt
The template requirements use current safe lower bounds and major-version caps for requests, eth-account, x402[evm], and web3 so installers do not resolve old vulnerable releases.
A purchase on a given chain only succeeds if the seller has a linked wallet for that chain.
Prefer the discovery contract before prompting payment:
available_chains from search results to choose a supported chain earlyGET /api/v1/items/{uuid} before purchase when chain availability mattersavailable_chains: [] as visible-but-currently-unpurchasable, not as a missing itemThis skill requires a durable local purchase store. See references/purchase-store.md for the recommended layout, capture fields, and verification notes.
See templates/purchase-record.json.
It is recommended to capture:
See references/purchase-store.md for policy links, verification notes, and local record guidance.
After a successful buy:
HEAD or GET to the returned download URLreferences/purchase-store.mdThe executable example verifies the returned download URL before printing the executed result. Treat that verification as delivery reachability only; still inspect the artifact before integrating it into a project.
Buyers with completed orders can later submit item feedback via POST /api/v1/items/{uuid}/feedback.
(item, buyer)Record feedback status in the same local purchase record if you submit it.
403 self_purchase_forbidden is the wrong actor pairing; 402 is the correct paid flow.currency or legal fields to /api/v1/items/{uuid}/acquire.chain remains as an advanced hint.PAYMENT-REQUIRED header extensions instead of duplicating the request shape in multiple places.--execute as a casual retry flag.--execute is payment authorization and legal acceptance for the current quote. Re-run quote mode if item, chain, amount, or terms changed.共 3 个版本