Sandbox and networks
Choose sandbox, localnet, mainnet, accounts, and automation mode intentionally.
Network flags force how pay interprets and satisfies payment challenges. With no flag, pay reads the network from the 402 challenge advertisement.
Agent summary
- Use
--sandbox(or-s) for tests and examples — no setup, no real funds. - Use
--mainnetonly when the user intends to spend real funds. - Use
--localonly when a Surfpool RPC is running locally on:8899. - Use
--account <name>when the user specifies a named account.
Flags
pay --sandbox curl <url> # alias: -s
pay --local curl <url>
pay --mainnet curl <url>
pay --account work curl <url>Networks at a glance
| Flag | Network | Default RPC | Wallet |
|---|---|---|---|
--sandbox | localnet | https://402.surfnet.dev:8899 (hosted Surfpool) | Ephemeral, auto-generated, auto-funded on first use. |
--local | localnet | http://localhost:8899 (your own Surfpool) | Ephemeral, auto-generated; you fund it however you like. |
--mainnet | mainnet | https://api.mainnet-beta.solana.com | The active mainnet account from ~/.config/pay/accounts.yml. Must be funded via pay topup before payment commands succeed. |
| none | from challenge | from challenge / pay.toml | Network-aware: matches whatever the challenge advertises. |
Surfpool is a Solana validator fork tuned for fast, deterministic local-network testing. The hosted instance at 402.surfnet.dev:8899 is shared across users and resets periodically; for production-style integration tests, run your own with --local.
Override any of these defaults via PAY_RPC_URL, PAY_MAINNET_RPC_URL, or pay.toml. See Global flags.
Automation output
pay --no-dna --sandbox curl <url>
pay --sandbox --verbose curl <url>--no-dna sets NO_DNA=1 for the process, which selects JSON-oriented output and non-interactive defaults. pay also emits JSON-oriented status when stdout is not a TTY. Only display transaction, signature, session, or status details when the command output actually includes them.