# solana-foundation/pay

CLI for Agentic payments (x402, MPP, AP2).

Repository: https://github.com/solana-foundation/pay
Canonical: https://ross.abutalabs.com/products/solana-foundation-pay
Homepage: https://pay.sh
Language: Rust
License: MIT
License Family: permissive
Last push: 2026-08-26T16:30:51+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 1779, "days_push": 7, "days_rel": 7, "gap_med": 1.5, "n_releases_24m": 33}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1762, forks 596 (observed 2026-08-28T04:05:32.698097+00:00)

## What it is
A Rust CLI that acts as a payment layer for HTTP, wrapping tools like curl and AI agents (Claude, Codex, Goose) to automatically handle HTTP 402 payment challenges via x402 and MPP protocols using Solana stablecoins. It includes a built-in MCP server, a local wallet-approval flow, and a payment gateway server for API providers.

## Use cases
- pay for paid APIs from the command line without accounts or API keys
- let AI agents make paid API calls with human wallet approval
- wrap curl or claude to handle HTTP 402 payment challenges automatically
- monetize an API with pay-per-request stablecoin payments
- discover and call metered paid API endpoints from an agent
- run a payment gateway in front of an existing API

## When to choose
- you want agents or scripts to pay per-request for APIs using stablecoins on Solana
- you need x402 or MPP 402 challenge handling in CLI or agent workflows
- you want human-in-the-loop wallet approval for agent spending
- you are an API provider adding pay-per-use pricing without accounts

## When to avoid
- you need payments on chains other than Solana or in fiat
- you prefer traditional API keys, subscriptions, or card-based billing
- you need a fully autonomous agent payment flow without local user authorization
- your stack requires a managed payment processor like Stripe

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, http-client, mcp, api-gateway, cryptography, sdk
- domain: fintech, apis, developer-tools, blockchain
- platform: cli, windows, rust, cross-platform
- tags: x402, mpp, stablecoin-payments, solana, agentic-payments, http-402, pay-per-request, wallet, acp, payment-gateway, cryptocurrency, ai-agents, command-line, macos, linux, nodejs

## Member repositories
- solana-foundation/pay (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:32.698097+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:27:02.592733+00:00, confidence not recorded.
  - readme: https://github.com/solana-foundation/pay (fetched 2026-08-28T04:05:32.698097+00:00, sha f2d1e3667b48)
  - homepage: https://pay.sh (fetched 2026-08-29T11:05:23.268769+00:00, sha a484f921f993)
  - site_page: https://pay.sh/docs (fetched 2026-08-29T11:05:23.271790+00:00, sha 4c7c7505cd75)
  - site_page: https://pay.sh/docs/building-with-pay/deployment/overview (fetched 2026-08-29T11:05:23.273695+00:00, sha d4ed3a436a16)
  - site_page: https://pay.sh/docs/toolchain/install (fetched 2026-08-29T11:05:23.275350+00:00, sha 0e485945d6ab)
- Data as of 2026-08-30T08:39:29.467469+00:00.
