tpay curl is a drop-in replacement for curl. It forwards every flag you pass. The difference: when a server responds with 402 Payment Required, tpay settles the payment from your wallet and retries the request — so your agent sees a normal 200 OK.
Make a paid request
1
The request is sent as-is
tpay runs the request exactly like curl would.2
A 402 is intercepted
If the server returns
402 Payment Required, tpay reads the accepts list — the price, network, token, and recipient.3
You approve the spend
tpay asks you to authorize the payment (Touch ID on macOS) before signing anything.4
The payment is attached and retried
tpay builds and signs the Sui payment, attaches it to the request, and sends it again. The server verifies and settles through the facilitator, then returns the resource.Passing curl flags
Everycurl flag works. A few common ones:
Choosing a wallet
By defaulttpay curl pays from the active wallet. Use --account to pay from a different one for a single request:
Networks
tpay pays on whichever network the server’s payment requirements specify — sui:mainnet or sui:testnet. You don’t choose the network for a payment; the seller does, and tpay matches it from the matching wallet balance.
If a payment can’t be made
If the wallet doesn’t have enough balance, or you decline the approval,tpay reports the reason and the request is not retried. Top up the wallet (see Managing wallets) and try again.
Next steps
Connect an agent
Expose
pay and get_balance to Claude and other MCP clients.