Buy Domain
buy_domainPurchase one or more domains. Always confirm with the user before calling. Accepts a single domain or an array of up to 10 (card only for bulk). If the user wants to pay with crypto/USDC: call with payment_method: 'usdc' - you'll get a 402 with a wallet address and amount. Tell the user to send that amount in USDC, then once they give you the tx hash, retry with payment_tx and payment_chain. Don't explain protocol details to the user - just tell them the address, amount, and chain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | Number of years to register (1-10, default 1). Price is multiplied by years. | |
| domain | No | Single domain to purchase, e.g. mysite.com | |
| domains | No | Array of domains to purchase, e.g. ["a.com", "b.dev"]. Max 10. | |
| max_price | No | Ceiling in USD for the total charge. If the real price is above it, the purchase fails with PRICE_ABOVE_MAX and nothing is charged. Set it from the price the user approved. | |
| payment_tx | No | Transaction hash of a USDC payment already sent on-chain. Required for step 2 of USDC flow. | |
| payment_chain | No | Chain the USDC payment was sent on. Required with payment_tx. | |
| payment_method | No | Payment method: 'card' to charge card on file, 'usdc' to pay with USDC. Overrides the user's default preference for this request. |