pay.sh docs
Toolchain

Install

Install the pay CLI, set up a wallet, and wire it into your AI agent.

pay ships as a single native binary. Pick the install path that matches your environment, then run pay --version to confirm.

ResourceLink
Sourcesolana-foundation/pay
Skills registrysolana-foundation/pay-skills
x402 specx402.org
MPP specpaymentauth.org

Homebrew (macOS, Linux)

brew install pay
pay --version

npm / npx

The npm package downloads the right native binary for your platform and caches it under node_modules/@solana/pay/bin/.

npm install -g @solana/pay
pay --version

Skip the global install with npx when you want a one-shot call:

npx @solana/pay --sandbox curl https://payment-debugger.vercel.app/mpp/quote/AAPL
npx @solana/pay claude "buy me some flowers"

From source

git clone https://github.com/solana-foundation/pay.git
cd pay
just install pay
pay --version

First paid call

The sandbox flag generates and funds an ephemeral wallet on first use. You don't need a real account to follow along.

pay --sandbox curl https://payment-debugger.vercel.app/mpp/quote/AAPL

See Global flags for the difference between --sandbox, --local, and --mainnet.

Wallet setup

Payment-bearing commands on mainnet (pay curl, pay claude, pay topup, …) auto-run pay setup the first time they don't find a mainnet account, so the typical path is install → first command → guided setup → done.

To set up explicitly:

pay setup
pay topup

pay setup generates a keypair, stores it in the OS secure store (Apple Keychain on macOS, GNOME Secret Service on Linux, Windows Hello on Windows), and installs MCP configuration for any detected agent client. pay topup opens the funding TUI — Solana Pay QR or onramp via PayPal/Venmo/Apple Pay.

See Configuration for the file layout and the pay setup reference for every flag.

Refresh agent integration

When pay is already installed but the MCP config for a new agent needs to be re-emitted:

pay setup --update

--update reinstalls MCP configs and the agent skill without creating a new account.

Verify

pay --version
pay whoami

pay whoami prints the system user, the active mainnet account, and its non-zero stablecoin balances. On a fresh sandbox-only setup, the account row is empty until you create one.

On this page