{"uid":"cap_gljaIpry0mSUPFqQ4s_qJ","slug":"oneshot-agent-commerce-buy-0a3f43a5","name":"OneShot Agent Commerce Buy","description":"Tools, payments, and compute orchestration for autonomous AI agents.\n\n## Authentication\n\n- **`x402Payment`** — paid tool endpoints use the [x402 payment protocol](https://x402.io).\n  First call returns `402 Payment Required` with a quote; sign and resend the request\n  with `payment-signature: <base64 x402 payment>` and `X-Quote-ID: <quote_id>`.\n- **`agentId`** — free read-only endpoints accept `X-Agent-ID: <wallet>` (0x… address).\n- **`soulKey`** — soul marketplace seller dashboard uses `Authorization: Bearer soul_…`\n  (issued by `POST /v1/soul/register`).\n- **`acpBearer`** — Stripe ACP checkout sessions use a separate bearer token plus the\n  `API-Version: 2026-01-30` header.\n\n## Async tools & polling\n\nMost tool endpoints return `202 Accepted` with `{ request_id, tool, status }`. Poll\n`GET /v1/requests/{id}` (with the same `X-Agent-ID`) to retrieve the final result.\nA WebSocket fallback is available at `wss://<host>/v1/requests/subscribe`.\n\n## Pricing\n\nPrices are listed at [docs.oneshotagent.com/pricing](https://docs.oneshotagent.com/pricing).\nA wallet (x402) call returns its exact price in the 402 quote before anything is charged.\nCalls paid from prepaid credits (access-token sessions, and the phone number purchase at\n`POST /v1/tools/voice/numbers`) debit the credit balance when the request is accepted, before the work runs\n(`200` for a synchronous lookup, `201` for the number purchase, `202` for a queued job),\nand answer `402 insufficient_credits` with nothing charged or bought when the balance cannot cover it.\n\n## Error format\n\n`{ \"error\": \"<machine_code>\", \"message\": \"<human readable>\", \"details\": <optional> }`.\nValidation errors include a `details` field with the failing field paths.","url":"https://win.oneshotagent.com/v1/tools/commerce/buy?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"quantity":{"type":"number"},"product_url":{"type":"string","format":"uri"},"shipping_address":{"type":"object","required":["first_name","last_name","street","city","state","zip_code","phone"],"properties":{"city":{"type":"string"},"phone":{"type":"string"},"state":{"type":"string"},"street":{"type":"string"},"country":{"enum":["US"],"type":"string"},"zip_code":{"type":"string"},"last_name":{"type":"string"},"first_name":{"type":"string"}}}}},"responseSchema":{"type":"json","example":{"tool":"commerce","status":"processing","receipt_id":"rcpt_uuid","request_id":"uuid"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lSmItFrTTzNCax5lfK24H","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Purchases a product from a URL on behalf of an AI agent, initiating a commerce transaction and returning a receipt","exampleAgentPrompt":"Go ahead and buy 2 units of this product for me: https://www.example-store.com/products/wireless-headphones — handle the purchase and give me the receipt ID when it's done.","exampleUseCases":[{"title":"Agent auto-reorders low inventory","prompt":"We're running low on office supplies — go buy 10 units of this stapler from https://officesupplystore.com/products/heavy-duty-stapler and send me the receipt."},{"title":"Gift purchase on behalf of user","prompt":"Buy 1 of these as a gift from https://giftshop.com/products/custom-mug — just one unit, and let me know the receipt ID once the order is placed."},{"title":"Automated dropship order fulfillment","prompt":"A customer just ordered, so please purchase 1 unit of https://supplier.com/products/bluetooth-speaker now to fulfill it — I need the receipt and request ID to track it."}],"resultDescription":"Returns a JSON object with the tool name ('commerce'), processing status, a unique receipt_id for the transaction, and a request_id for polling the async result via GET /v1/requests/{id}.","failureModes":["Invalid or unreachable product_url returns an error","Quantity of 0 or negative may be rejected","Payment 402 must be handled before the purchase proceeds — unsigned or missing payment header causes rejection","Product out of stock or unavailable at the target URL","Async job may fail after 202 acceptance — poll /v1/requests/{id} to detect final failure","Unsupported retailer or region may result in a failed fulfillment"],"whenToPreferThis":"Use this endpoint when an AI agent needs to autonomously purchase a product from an e-commerce URL without human checkout interaction. Prefer this over search-only or browse endpoints when you have a specific product URL and quantity ready. It is the right choice when you need a receipt and async tracking of a fulfilled order, and when you are prepared to handle x402 micropayment authentication.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T18:52:51.547Z","isFirstParty":false,"canonicalSlug":"oneshot-agent-commerce-buy-0a3f43a5"}