pay_kusd
Buy one call from the kUSD market: discover the providers listing capability for kUSD
(registry_search currency='kUSD'), rank them (policy: registry | cheapest | reputation), pay the
best one from YOUR kUSD wallet — at most max_price_cents — and return its result. The payment
is a kUSD box of exactly the quoted cents to the provider, on the x402 wire (PAYMENT-REQUIRED /
PAYMENT-SIGNATURE) or k402's kusd-utxo header; each payment also locks 1.5 KAS in the box (yours
to recover is the provider's) plus ~0.1 KAS fee, reported in outlay. If the wallet is short it
buys the shortfall + 50 cents through the kUSD PSM with your KAS. Fails over to the next provider
when one is dead. Every payment stays inside the bounds the wallet's OPERATOR set (per-call ceiling,
budgets, rate, top-up cap, allowlists, freeze — see kusd_spend_status); a refusal returns
{"error", "code", "spend"} and nothing was paid. Local (stdio) k402-mcp only.
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": {
"capability": "<capability>",
"request_body": "<request_body>"
},
"name": "pay_kusd"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| policy | No | registry | |
| capability | Yes | ||
| request_body | Yes | ||
| max_price_cents | No |