Pay anything: hand it any bill
payOne tool for any payment request. Pass whatever you were asked to pay: a Swap Ripper paywalled API URL (it buys access and returns an access_key), an x402 / HTTP 402 invoice, a Swap Ripper payment link, a Solana Pay link (solana:...), an Ethereum payment link (ethereum:..., EIP-681, any supported EVM chain), a Bitcoin link (bitcoin:...), plain text like 'send 20 USDC to 0xabc... on base', or {to, token, chain, amount}. Swap Ripper works out who gets what, then pays it EXACTLY using whatever token you hold on any chain. Call with only request to see what it understood; add pay_with_token, pay_with_chain and refund_address to get a deposit address.
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": {
"request": "<request>"
},
"name": "pay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test | No | Test mode: true = no real money. You get a fake deposit address that completes by itself in ~15s, so you can test status, invoices, receipts and webhooks for free. | |
| speed | No | Optional. Default 'best_price': Swap Ripper quotes two networks at once and uses whichever is cheaper for you (and the other if one fails); the reply's route_choice shows both. 'fast' forces the ~seconds Relay route. | |
| amount | No | Only if the request has no amount: how much the recipient should get. | |
| wallet | No | x402 only: YOUR address on the invoice's network (your x402 client signs from it). | |
| request | Yes | The payment request: link, URI, 402 body, plain text, or {to, token, chain, amount}. | |
| referrer | No | Optional: your NEAR account (e.g. 'myagent.near'). You earn 1/3 of the service fee on every swap routed with it. The user pays the same. | |
| access_key | No | Paywalled APIs only: an existing access_key to top up. | |
| request_id | No | Recommended: your own unique ID for this payment (e.g. a UUID). Retrying with the same request_id returns the SAME payment instructions, so you never pay twice. | |
| slippage_bps | No | Max slippage in basis points (default 100 = 1%, range 10-500). | |
| pay_with_chain | No | Chain you pay from, e.g. 'solana'. | |
| pay_with_token | No | Token you hold and will pay with, e.g. 'SOL', 'USDC', 'ETH'. | |
| refund_address | No | Your address on the paying chain, for automatic refunds. |