pay.sh docs
Toolchain

Configuration

Files pay reads on every invocation — pay.toml, accounts.yml, and the PAY_* environment variables.

pay reads three sources, in this order of precedence:

  1. Explicit flags (--sandbox, --account, …)
  2. PAY_* environment variables
  3. pay.toml (looked up via $PAY_CONFIG, then ./pay.toml, then ~/.config/pay/pay.toml)
  4. Built-in defaults

Accounts live separately in ~/.config/pay/accounts.yml. That file is mandatory once you have a non-ephemeral wallet.

~/.config/pay/accounts.yml

The on-disk registry of wallets, grouped by network. Schema version 2:

version: 2
accounts:
  mainnet:
    default:
      keystore: apple-keychain # apple-keychain | gnome-keyring | windows-hello | file | ephemeral
      active: true # used when multiple accounts share a network
      auth_required: true # mainnet defaults to true; sandbox defaults to false
      pubkey: 96WoyH3JmANSMsQLGC3MKyiGiXCymZyM9SLaWjcRrKuD
  localnet:
    sandbox-abc123:
      keystore: ephemeral
      pubkey: 5jSk… # base58
      secret_key_b58: 4xZ… # only for keystore: ephemeral
      created_at: 2026-05-02T17:21:03Z
FieldRequiredDescription
keystoreyesWhere the secret key lives. apple-keychain, gnome-keyring, windows-hello, file, or ephemeral.
activenoWhich account to use when multiple accounts share a network. If no account is marked active, pay falls back to the first alphabetically.
auth_requirednoRequire an OS prompt before signing. true by default on mainnet, false on sandbox/localnet.
pubkeyyesCached base58 public key.
pathonly filePath to the JSON key file on disk.
secret_key_b58only ephemeralInline base58 secret. Used for sandbox-generated wallets.
created_atonly ephemeralRFC 3339 timestamp.
subscriptionsnoMap of subscription IDs to local subscription state, written by pay subscriptions.

Keystore backends

BackendPlatformNotes
apple-keychainmacOSDefault on macOS. Stored in the user's login keychain.
gnome-keyringLinuxDefault on Linux when the Secret Service is available.
windows-helloWindowsDefault on Windows.
fileanyPlain JSON key file at path. Use only when secure storage isn't available.
ephemeralsandbox onlyAuto-generated by --sandbox calls and persisted under localnet:.

~/.config/pay/pay.toml

Optional defaults applied to every invocation. All keys are optional.

auto_pay   = false                                  # auto-satisfy 402 challenges
keypair    = "~/.config/solana/id.json"             # legacy keypair for non-payment commands
rpc_url    = "https://api.mainnet-beta.solana.com"  # RPC override
log_format = "text"                                 # text | json
KeyTypeDefaultDescription
auto_payboolfalseAutomatically satisfy HTTP 402 challenges without prompting.
keypairstringPath to a Solana keypair file, for commands that read pay.toml directly.
rpc_urlstringMainnet RPC override. Subordinate to --sandbox/--local/--mainnet and to PAY_RPC_URL.
log_formatstring"text""text" or "json".

Discovery order: $PAY_CONFIG, then ./pay.toml, then ~/.config/pay/pay.toml. Any PAY_* environment variable wins over the file.

Environment variables

See Global flags → Environment variables for the full table. The two you reach for most:

VariableWhat it does
PAY_ACTIVE_ACCOUNTForce a named account, overriding active: true in accounts.yml.
NO_DNAMark the caller as an AI agent: enables auto-pay and JSON-shaped output.

On this page