{"endpoint":"/api/agent/purchase","method":"POST","description":"Purchase a Peach Token NFT on behalf of a buyer. Implements the x402 payment protocol: send the request without an Authorization header to receive payment instructions, then retry with proof of payment.","headers":{"Content-Type":"application/json","Authorization":"x402 <txHash>  // required on retry after payment","Idempotency-Key":"<uuid>      // optional, prevents duplicate mints"},"request_schema":{"product_id":"string (required) — must be 'peach-box-2026'","buyer_wallet":"address (required) — receives the token if gift_to is omitted","gift_to":"address (optional) — mint destination when gifting"},"example_request":{"product_id":"peach-box-2026","buyer_wallet":"0xabc...","gift_to":"0xdef..."},"flow":[{"step":1,"description":"POST without Authorization header","response_status":402,"example_response":{"payment_options":[{"protocol":"x402","network":"base","asset":"ETH","amount":"0.03","pay_to":"0xOwner..."},{"protocol":"x402","network":"base","asset":"USDC","amount":"95.00","token_address":"0xUSDC...","pay_to":"0xOwner..."}],"product_id":"peach-box-2026"}},{"step":2,"description":"Pay on Base, then retry with Authorization: x402 <txHash>","response_status":200,"example_response":{"status":"success","token_id":"104","contract_address":"0x625185ccDD81B3c0C3E015C7FC616A9Bf75e2F2f","tx_hash":"0x..."}}],"failure_responses":{"400":"Invalid JSON, unknown product_id, missing/invalid buyer_wallet or gift_to","402":"Payment required — see payment_options in response body","410":"Sold out","422":"Payment verification failed","500":"Mint transaction failed or server misconfiguration","503":"Contract not yet deployed"}}