Get the x402 payment requirements for a request
get_payment_requirementsThe exact x402 402 (price, USDG asset, payTo, network, extensions) for one specific request to an x402Fi endpoint, without paying or calling the paid endpoint. Quoted endpoints are priced for this exact request. Sign the returned accepts[0] with the user's own wallet, then send the request with the PAYMENT-SIGNATURE header (a seller's own v1 endpoint reads X-PAYMENT instead: see payment_header in the result).
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>"
},
"name": "get_payment_requirements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The full request URL including any query string, e.g. https://x402fi.dev/g/stockfi-trade/v1/preflight?symbol=AAPL | |
| body | No | JSON body for POST/PUT/PATCH, as a string. | |
| method | No | Default GET. |