Pay and access
pay_and_accessUse this only after the person agrees to pay. It is the only tool that spends. prepare_checkout never pays, and get_receipt never charges. Input: offer_id, the confirmation from prepare_checkout, and confirm=true. Pass confirm=false to decline. Public callers get x402 payment requirements instead of a charge. The server wallet signs only for the owner key on Sepolia testnet.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pay_and_access"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | True only after the person agrees to pay. False declines and spends nothing. | |
| offer_id | No | Accepted offer id from negotiate_price or prepare_checkout. | |
| confirmation | No | Single-use confirmation returned by prepare_checkout. Required when confirm is true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| paid | Yes | ||
| payee | Yes | ||
| network | Yes | ||
| options | Yes | ||
| payment | Yes | ||
| testnet | Yes | ||
| offer_id | Yes | ||
| quantity | Yes | ||
| resource | Yes | ||
| expires_at | Yes | ||
| total_usdc | Yes | ||
| transaction | Yes | ||
| confirmation | Yes | ||
| instructions | Yes | ||
| network_name | Yes | ||
| schema_version | Yes | ||
| uses_remaining | Yes | ||
| expires_at_europe_madrid | Yes |