Buy Product from Merchant
four02_buy_productInitiates a product purchase from a merchant catalog and returns x402 payment instructions with USDC amount, payment address, and EIP-712 fields for wallet approval.
Instructions
Purchase a product or service from a merchant's catalog. This initiates the x402 payment flow — you'll receive payment instructions including the amount in USDC, the payment address, and the EIP-712 signature fields. Your wallet must have USDC on Base network and have approved the Four02 facilitator.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"merchantId": "<merchantId>",
"productId": "<productId>"
},
"name": "four02_buy_product"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Order notes (e.g. 'no sugar', 'rush delivery', 'extra hot') | |
| quantity | No | Quantity to purchase (default: 1) | |
| productId | Yes | The product ID from the catalog | |
| merchantId | Yes | The merchant ID |