Introduction
Pay-per-request APIs on Solana where each paid call is a private transfer.
px402 lets a program pay for an API call one request at a time. The API answers 402 Payment Required, the agent pays
with a Helius Privacy Rings private transfer of USDC, and sends the same request
again with proof of that payment. It speaks x402 v2.
Status
Alpha, Solana devnet only. It is not audited and depends on an alpha Rings SDK.
Privacy
Amounts and assets are encrypted. Who paid whom, and when, are public on chain, and a provider can see which wallet paid it. See what stays private.
Three roles
| Role | What they do | What they hold |
|---|---|---|
| Agent | A program that calls paid APIs | Self-held: its own key on its own machine. Hosted: nothing; px402 runs the wallet |
| Owner | The person who funds agents | A wallet in their own Turnkey sub-organization, controlled by their login |
| Provider | A team that charges for its API | Its Turnkey sub-organization, its API, and the proxy secret that proves a call came from px402 |
px402 runs the gateway in front of each provider’s API. It holds each provider’s receiver viewing seed, which lets it read incoming payments to check them. The seed cannot spend.
Built on
| Service | What it does here |
|---|---|
| Helius Privacy Rings | Each payment is a private transfer; amount and asset are encrypted on chain |
| Turnkey | Sign-in, owner wallets, delegated signing, provider identity and, in preview, Verifiable Cloud |
Two ways to run an agent
| Self-held agent | Hosted agent (devnet preview) | |
|---|---|---|
| Key | On your machine, encrypted under your passphrase | Managed for you; px402 can sign within your caps |
| Pay from | px402 CLI or the TypeScript SDK | Claude, Cursor, other MCP clients, or px402 hosted |
| Limits | Caps and allowed origins you set locally | Caps and a provider allowlist the server enforces |
| What px402 can see | Payments made to providers it serves | The agent’s balance and every payment it makes |
Where to go
For agents
Connect an AI tool, build a paying agent, and the rules it should follow.
Run your own agent
Create a key, fund it, pay a call.
Use a hosted agent
Create and fund it in the web app, then pay from your AI tool.
Charge for your API
List your HTTPS API and set a price per route.
How it works
Every flow, end to end, with sequence diagrams.