Wallets for agents.
Hold funds, receive payments, pay other agents, charge users. The financial primitive that makes agent commerce possible. x402 native.
# Create a wallet $ curl -X POST https://pay.prim.sh/v1/wallets \ -H "X-402-Payment: $TOKEN" { "id": "wal_m8x3k7", "balance": "0.00", "deposit_ln": "lnbc...", "deposit_base": "0x..." } # Fund it (deposit via Lightning or Base L2) # ... send to deposit address ... # Pay another agent's service $ curl -X POST https://pay.prim.sh/v1/wallets/wal_m8x3k7/pay \ -H "X-402-Payment: $TOKEN" \ -d '{"to": "https://spawn.prim.sh/v1/instances", "amount": "0.012"}' # Create a charge (agent sells a service) $ curl -X POST https://pay.prim.sh/v1/charges \ -H "X-402-Payment: $TOKEN" \ -d '{"amount": "0.05", "description": "API call", "wallet": "wal_m8x3k7"}' { "id": "chg_k2m8x9", "payment_request": "lnbc50n1p...", "status": "pending" }
x402 native
Lightning + Base L2
Hold + send + receive
Agent-to-agent payments
Part of agentstack

What agents use it for

Agent economy

Agent builds a service. Charges other agents via x402. Revenue goes to its pay.sh wallet. No Stripe, no bank account, no human in the loop.

Budget management

Human funds a wallet with $50. Agent spends it across spawn.sh, relay.sh, ring.sh. Balance visible via API. Auto-stop when budget hits zero.

Revenue splitting

Agent earns money → splits revenue: 80% to human's wallet, 20% to operating reserve. Programmable finance.

Escrow

Agent A hires Agent B. Funds locked in escrow. On delivery + verification, funds release. Trustless agent-to-agent contracting.

Micropayments

Pay $0.001 per API call. Pay $0.0001 per event. Lightning makes sub-cent payments viable. The unit economics of agent services.

x402 proxy

Agent has a pay.sh wallet. Needs to call any x402 service on the internet. pay.sh handles the payment flow automatically. One wallet, every x402 service.

API reference

# Wallets
POST   /v1/wallets                 # Create wallet
GET    /v1/wallets                 # List wallets
GET    /v1/wallets/:id             # Balance + deposit addresses
GET    /v1/wallets/:id/txns        # Transaction history

# Spending
POST   /v1/wallets/:id/pay         # Pay an x402 endpoint
POST   /v1/wallets/:id/send        # Send to another wallet or address
POST   /v1/wallets/:id/withdraw    # Withdraw to external LN/L2

# Receiving
POST   /v1/charges                 # Create payment request
GET    /v1/charges/:id             # Check payment status

# Escrow
POST   /v1/escrow                  # Lock funds
POST   /v1/escrow/:id/release      # Release to recipient
POST   /v1/escrow/:id/refund       # Refund to sender

# Budget controls
PUT    /v1/wallets/:id/limits      # Set spend limits (per-hour, per-day)

Pricing

ActionCostNotes
WalletFreeNo monthly fee
DepositFreeLightning or Base L2
x402 payment (outbound)0.5%Of transaction amount
Charge (inbound)1.0%Of received amount
Wallet-to-walletFreeWithin pay.sh
WithdrawalNetwork feeLightning or Base L2
Escrow0.5%On release

Money is an API call.

Agents don't have bank accounts. They have wallets.

Read the docs →