PaySpawn is non-custodial payment infrastructure for AI agents. Give your agent a credential to spend, receive, and transact — without giving it your private keys. Built on Base with USDC.
Your keys never leave your wallet. We store nothing sensitive.
Agent holds a limited credential. Revoke anytime.
Pay for web content automatically. Built-in x402 support.
Fast, cheap transactions on Coinbase's L2.
Revoke agent access on-chain anytime. Immediate effect.
Pay to alice.pay instead of hex addresses.
Pay to any .eth name directly.
We cover gas. Agents just need USDC.
Go to /dashboard
New to crypto? Create a wallet with Face ID / fingerprint. No seed phrase needed.
Have a wallet? Connect via MetaMask, Rabby, Coinbase Wallet, etc.
Transfer USDC from another wallet on Base, or
Buy USDC with credit card / Apple Pay (coming soon)
Set your daily spending limit (e.g., $100/day)
Set expiration (e.g., 1 year)
Smart Wallet: Off-chain signature — no gas cost
Standard wallet (MetaMask, Phantom): One USDC approval transaction (~$0.005)
Copy your credential string
The credential is a single string your agent stores like any secret:
import { PaySpawn } from '@payspawn/sdk'const ps = new PaySpawn(process.env.PAYSPAWN_CREDENTIAL)// Pay by addressawait ps.pay("0x1234...", 10.00)// Pay by ENSawait ps.pay("vitalik.eth", 5.00)// Pay by PaySpawn nameawait ps.pay("alice.pay", 25.00)// Check balanceconst balance = await ps.balance() // "142.50"// Get address to receive paymentsconst myAddress = ps.address // "0x..."// Pay for x402 content automaticallyconst data = await ps.fetch("https://api.example.com/premium")
npm install @payspawn/sdk
import { PaySpawn } from '@payspawn/sdk'// Initialize with your credentialconst ps = new PaySpawn(process.env.PAYSPAWN_CREDENTIAL)
ps.pay(to, amount)Send USDC to address, ENS name, or PaySpawn name
ps.balance()Get current USDC balance
ps.addressGet wallet address (for receiving payments)
ps.fetch(url, options?)Fetch URL with automatic x402 payment handling
ps.remaining()Get remaining daily allowance
from payspawn import PaySpawnps = PaySpawn(os.environ['PAYSPAWN_CREDENTIAL'])# Make a paymentresult = ps.pay("alice.pay", 10.00)print(f"Paid! TX: {result['txHash']}")# Check balancebalance = ps.balance() # "142.50"
The credential your agent holds is a session key — a signed permission that authorizes spending up to your limits. It's not a private key.
{"signature": "EOA", // "EOA" for standard wallets, "0x..." for Smart Wallets"permission": {"account": "0x...", // Your wallet address"spender": "0xaa8e...", // PaySpawnSpenderV5.3 contract"token": "0x8335...", // USDC on Base"allowance": "100000000", // 100 USDC (6 decimals)"period": 86400, // 24 hours"start": 1706400000, // When it starts"end": 1737936000, // When it expires"maxPerTx": "0", // Per-tx cap (0 = unlimited)"allowedTo": [], // Recipient whitelist (empty = any)"maxTxPerHour": 0 // Velocity limit (0 = unlimited)}}
Allowance refills each period. $100/day means $100 every 24 hours.
Revoke on-chain anytime from the dashboard. Immediate effect.
Agent holds the same credential until expiry or revocation.
Only works with PaySpawn. Can't be used elsewhere.
x402 is a protocol for HTTP-native payments. When a server returns 402 Payment Required, the SDK automatically pays and retries.
// Agent fetches premium contentconst data = await ps.fetch("https://api.example.com/premium-data")// Behind the scenes:// 1. SDK requests the URL// 2. Server returns 402 with price ($0.01)// 3. SDK pays automatically (within your limits)// 4. Server returns the content// 5. Agent gets the data
Instead of sharing a hex address, use a human-readable name.
Claim your name in the dashboard. Names are registered on-chain.
Fee is additive — recipient gets the full amount. We cover gas.
Your credential stays with you. We're a stateless relay. If our servers are compromised, there's nothing to steal.
The session key has spending limits baked in. Even if someone steals your agent's credential, they can only spend up to your daily limit.
Revoke the credential on-chain anytime. Effect is immediate. The old credential becomes useless.
Compromised credential: Attacker can spend up to your daily limit until you revoke. Damage is capped.
Compromised private key: Everything gone. No recovery.
That's why agents get credentials, not keys.
Deployed on Base Mainnet. Verified on Basescan.