Buy credits
buy_creditsBuy a pack of Aquedra Run credits (US$5, US$20, US$50, US$100; 1 credit = US$1), only when the user asked for it or authorized their wallet to spend. With method "card" the result has a checkout_url the person completes in their browser; this tool never charges a card. With method "usdc" and no payment, the result is an x402 payment request (isError, PaymentRequired in structuredContent); an x402 wallet pays by calling this tool again with the same arguments and the signed payment in params._meta["x402/payment"], and the result's _meta["x402/payment-response"] carries the settlement. If a result says a payment is pending, do not pay again: call again with the same payment.
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": {
"pack_usd": "<pack_usd>"
},
"name": "buy_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | card returns a checkout_url the person pays in their browser; usdc pays over x402. | card |
| pack_usd | Yes | Credit pack in US dollars; 1 credit = US$1. |