github solana-foundation/pay pay-v0.1.0

latest release: ts-pay-v1.0.0-beta.0
one day ago

The missing HTTP 402 client.

Wrap curl or wget — when an API returns 402, pay detects the payment protocol, signs a Solana transaction, and retries. The response lands on stdout as if nothing happened.

Important

pay is in early release — the 402 ecosystem is just getting started. Expect rough edges and rapid iteration.
Always stay on the latest version for the best experience.

Highlights

  • Transparent 402 handling — supports both https://mpp.dev/ and https://x402.org/ payment protocols
  • Touch ID & 1Password — keypairs stored securely, never on disk in plaintext
  • Session budgets — interactive TUI to set spending caps before making requests
  • AI-native — built-in MCP server; pay claude and pay codex just work
  • Dev mode — pay --dev gives you an ephemeral funded keypair via https://github.com/txtx/surfpool, zero setup

Try it now

  # See the 402
  curl -i https://402-demo-api.vercel.app/mpp/quote/SOL

  # Handle it automatically
  pay --dev curl https://402-demo-api.vercel.app/mpp/quote/SOL

Install

  # From source
  git clone https://github.com/solana-foundation/pay.git
  cd pay/rust && cargo install --path crates/cli

Don't miss a new pay release

NewReleases is sending notifications on new releases.