pay.sh docs
ToolchainCommands

Pass-through

pay curl, wget, http, claude, codex, and whoami — wrap an external tool while pay handles HTTP 402.

Pass-through commands wrap a familiar tool (curl, wget, http, claude, codex) so its surface area stays unchanged while pay transparently negotiates HTTP 402. whoami rounds out the group with a read-only identity check.

pay curl

Make an HTTP request via curl, handling 402 Payment Required flows.

All arguments after curl are forwarded to the system curl binary. There are no pay-owned flags — anything you can write to curl works here.

pay --sandbox curl https://payment-debugger.vercel.app/mpp/quote/AAPL
pay --sandbox curl https://example.gateway/v1/search \
  -H 'content-type: application/json' \
  -d '{"query":"test"}'

On a 402 response, pay decodes the challenge, signs it with the active account, and retries the request with the credential attached. The response body lands on stdout exactly as curl would print it.

pay wget

Download a resource via wget, handling 402 Payment Required flows.

pay --sandbox wget https://example.gateway/v1/export.csv

All arguments after wget are forwarded to the system wget binary.

pay http

Make an HTTP request via HTTPie, handling 402 Payment Required flows.

pay --sandbox http GET https://example.gateway/v1/search query==test
pay --sandbox http POST https://example.gateway/v1/items name=widget price:=12

All arguments after http are forwarded to the system http (HTTPie) binary. HTTPie's request-item syntax (field=value for JSON strings, field:=raw for raw values, Header:value for headers) is supported.

pay claude

Run Claude Code with 402 payment support attached.

pay --sandbox claude
pay --sandbox --debugger claude
pay --sandbox claude "buy me some flowers"

All arguments after claude are forwarded to the claude binary. pay injects:

  • the local Pay MCP server, so Claude can browse the skills catalog and make paid requests;
  • an allowed-tools scope that covers pay search, endpoint lookup, paid curl, balance, and provider validation;
  • a system prompt that teaches Claude when it's running under pay.

claude must be on $PATH.

pay codex

Run Codex with 402 payment support attached.

pay --sandbox codex
pay --sandbox --debugger codex

All arguments after codex are forwarded to the codex binary. The injected MCP server, allowed-tools scope, and system prompt match pay claude. codex must be on $PATH.

pay whoami

Show the system user, the active mainnet account, and its non-zero stablecoin balances.

pay whoami
FlagTypeDescription
--account <NAME>stringInspect a specific account instead of the active one.

Balances are fetched via the pay-api. When the API is unreachable, pay shows a yellow api offline indicator next to a clickable balance ↗ link to the account's Solana Explorer page — the account itself is unaffected.

See also

On this page