Call Merchant API
four02_call_apiCall a merchant API endpoint through Four02's payment proxy; the first request returns 402 payment instructions, then paid requests are proxied to the merchant's actual API.
Instructions
Call a merchant's API endpoint through Four02's payment proxy. Use this for developer-tier merchants who offer API services (weather data, translation, AI services, etc.). The first call returns payment instructions (402). After paying, the request is proxied to the merchant's actual API and you get the response.
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>",
"path": "<path>"
},
"name": "four02_call_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body as JSON string (for POST/PUT) | |
| path | Yes | The API endpoint path (e.g. '/weather/current') | |
| method | No | HTTP method (default: GET) | |
| merchantId | Yes | The merchant ID | |
| paymentHeader | No | Base64-encoded X-PAYMENT header with signed EIP-712 payment. Omit on first call to get payment instructions. |