A Stripe-style payment gate for the agent economy. Install the SDK, add a few lines, and bots pay USDC on Solana before they get past your paywall โ humans never see a thing.
npm install @agentpayments/node
The gate sits in front of whatever you're already serving โ an API, a PDF, a dataset. It doesn't touch your app logic, and it never sees a browser visitor.
A lightweight, invisible proof-of-work challenge tells humans from bots. Real visitors never notice the gate is there.
Non-browser traffic โ crawlers, bots, LLM agents โ gets an HTTP 402 back with exactly what to pay and where, in a machine-readable format.
The agent sends USDC on Solana with its key as the memo. The gate checks the chain directly โ no accounts, no webhooks, no card numbers.
Node, edge runtimes, and Python are first-class. The gate logic is identical everywhere.
// npm install @agentpayments/node const { agentPaymentsGate } = require('@agentpayments/node'); app.use(agentPaymentsGate({ challengeSecret: process.env.CHALLENGE_SECRET, homeWalletAddress: process.env.HOME_WALLET_ADDRESS, }));
// npm install @agentpayments/edge import { createAgentPaymentsWorker } from '@agentpayments/edge/cloudflare'; export default createAgentPaymentsWorker({ assetsBinding: 'ASSETS', });
# pip install agentpayments-python MIDDLEWARE = [ "agentpayments_python.django_adapter.GateMiddleware", # ... ]
An agent that hits a 402 doesn't need to register anywhere โ it reads the payment instructions straight out of the response and pays on-chain.
Same as any other HTTP call โ no headers, no auth, no prior setup.
Wallet address, amount, and a memo to attach โ plus a standards-compliant x402 payload for agent frameworks that already speak it.
Include the issued key as X-Agent-Key on the next request. The gate checks the chain directly and lets it through.