x402_protected_call
Make an HTTP API call with manual escrow protection. Full control over verification and timelock parameters.
For most payments, use safe_pay instead — it auto-configures protection based on seller trust.
Use x402_protected_call when you need:
Custom JSON Schema verification (not just "valid JSON + 2xx")
Hash-lock verification (exact response match)
Specific timelock durations
To override safe_pay's trust-based amount limits
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": {
"url": "<url>",
"seller_address": "<seller_address>",
"amount_usdc": "<amount_usdc>",
"verification_data": "<verification_data>"
},
"name": "x402_protected_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The API endpoint URL to call | |
| body | No | Request body (for POST/PUT) | |
| method | No | HTTP method | GET |
| headers | No | HTTP headers to include | |
| amount_usdc | Yes | Amount to pay in USDC | |
| seller_address | Yes | Ethereum address of the API provider (seller) who will receive payment | |
| timelock_minutes | No | Minutes until escrow expires | |
| verification_data | Yes | Verification data: JSON Schema string (for schema strategy) or expected hash (for hash-lock) | |
| verification_strategy | No | How to verify the response: 'schema' (JSON Schema) or 'hash-lock' (exact hash match) | schema |