Record x402 payment
spend_record0.002 USDC per call via x402, no key (unpaid call returns PaymentRequired; retry with params.meta["x402/payment"]). Record an x402 payment the agent made (or update a reserved one by spendId/ref): status settled|failed|pending|refunded, tx; verify:true checks a Base tx on-chain (read-only). Builds the spend log / receipts. Needs a key mts (X-API-Key header or apiKey argument). No key? call settle_trial_key (free, 50 calls/7 days). Full plan 1 USDC/30d incl. 1,000 calls via x402.
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": "spend_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx | No | Settlement tx hash on Base, 0x + 64 hex. | |
| ref | No | Your order / request id (idempotency key). | |
| host | No | Seller hostname, e.g. api.example.com. | |
| note | No | Free-text note (max 200 chars). | |
| payTo | No | Seller receiving address 0x…. | |
| payer | No | Payer / agent wallet address 0x… (40 hex). | |
| apiKey | No | Your MoneyTools Settle key mts_… (alternative to the X-API-Key header). No key: call settle_trial_key. | |
| status | No | New status (see tool description). | |
| verify | No | true = verify tx on Base (read-only). | |
| network | No | CAIP-2 network, default eip155:8453 (Base). | |
| spendId | No | Spend id sp_… from spend_check reserve. | |
| amountUsd | No | USD amount as decimal string, e.g. "0.25". | |
| sessionId | No | Your session / run id. | |
| paymentRequired | No | The 402 PAYMENT-REQUIRED header (base64) or the 402 JSON body. |