Try Radius
Create a wallet, send SBC, and pay for an API request
Everything on this page runs on Radius Testnet with test funds. Each step calls the same radius-sdk functions you use in your own code, and links every transaction to the testnet explorer.
1. Create and fund a wallet
Create a wallet, then click Get testnet SBC. The faucet sends 0.5 SBC, the payment asset, and a small amount of RUSD, the native fee asset.
The private key is generated in your browser and stays in its local storage. The other examples in these docs use the same wallet. In your own code, createRadiusFetch takes the key as signer, and fund() calls the testnet faucet.
2. Send SBC
Send SBC to any address. The default recipient is the testnet faucet, so the test funds go back to it.
The time includes signing, sending, and waiting for the transaction receipt: Radius confirms transactions with sub-second finality. The fee is a fixed gas price paid in RUSD. A wallet that holds only SBC can still send, because the Turnstile converts SBC to RUSD when a transaction needs gas.
3. Pay for an API request
Request a “Hello, world!” message for 0.001 SBC. The greeting is the resource you pay to receive; x402 handles the payment. Test funds go back to the testnet faucet.
- Click Request without paying. The API answers
402 Payment Requiredand describes the price in thePAYMENT-REQUIREDheader. - Click Pay and request. The client reads the offer, checks it against your limit, signs a payment authorization, and sends the request again. The API settles the payment and returns
{"message":"Hello, world!"}. - Lower Your limit per request to 0.0001 SBC and click Pay and request again. The price exceeds your limit, so the client refuses before signing a payment.
Request GET /api/try/hello for 0.001 SBC. After payment, the API returns {"message":"Hello, world!"}.
A new wallet needs only testnet SBC to pay. The SDK signs the payment authorization, and the Radius facilitator submits the settlement transaction. See x402 payments for the full request lifecycle.
Build it yourself
- Accept payments: charge for API routes in a Hono app or Cloudflare Worker.
- Make payments: pay x402 endpoints from an app or agent, within a limit.
- Sell a data lookup and buy a data lookup: build a more detailed paid API example on testnet.
- radius-sdk reference: every option and function used on this page.