Pay BSV HTTP 402 API
pay_402Preview the exact invoice price before signing, then pay HTTP 402 pay-per-call BSV APIs within a satoshi cap using the kit's own BSV.
Instructions
Pay a BSV pay-per-call API (HTTP 402, BRC-166) from this kit's own BSV. Call with confirm false to see the price first.
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>",
"max_sats": "<max_sats>",
"confirm": "<confirm>"
},
"name": "pay_402"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL of the BSV pay-per-call API resource. | |
| body | No | Optional request body, sent unchanged on the price check and payment retry. | |
| method | No | Optional HTTP method. Defaults to GET. | |
| confirm | Yes | false previews the exact invoice price without signing; true signs and sends the BRC-166 payment header. | |
| max_sats | Yes | Maximum invoice amount in satoshis. The kit refuses a higher price and its own caps may be lower. | |
| content_type | No | Optional Content-Type for body. Without it, a body is sent as application/json. |