Agent Payments
Let autonomous Agents initiate stablecoin payments under explicit policies, budgets, and approvals without unrestricted wallet authority.
Agent Payments is StableOps's payment control layer for Agents. An operator registers payment wallets, activates immutable spending policies, sets budgets, and issues a restricted Agent Key. The Agent runtime can purchase paid resources only within those boundaries.
How one payment completes
- The Agent SDK requests a paid resource and reads its x402
402payment requirements. - The StableOps control plane validates origin, recipient, network, asset, amount, policy, and both daily budgets.
- If a human decision is required, the Intent waits for approval and later resumes with the same Intent.
- A customer-hosted signer sidecar validates the short-lived execution grant before signing with a local key or AWS KMS.
- The Agent SDK retries the original resource with the payment credential while the control plane reconciles resource and onchain settlement states.
Trust boundaries
- The Agent runtime holds only a restricted Agent Key and sidecar token. It cannot change wallets, policies, budgets, or approvals.
- The signer signs only typed data that exactly matches a StableOps execution grant; it exposes no arbitrary signing interface.
- Wallet private keys and KMS permissions stay in the customer environment.
- StableOps does not proxy business requests, broadcast payment transactions, or hold customer private keys.
- Payment state and resource state are tracked separately; receiving a resource does not prove settlement.
Packages
| Package | Runs in | Responsibility |
|---|---|---|
@stableops/agent-payments-api-sdk | Operator service | Manage Agents, wallets, policies, budgets, approvals, and queries |
@stableops/agent-sdk | Agent runtime | Request paid resources and coordinate Intents, approvals, and signing |
@stableops/agent-signer | Customer signer | Validate grants and sign with a local wallet key or AWS KMS |
Supported scope
- Server-side Node.js 20 or later; no browser or edge runtime support.
- x402 v2
exact,GET, and HTTPS paid resources. - The asset is limited to the configured USDC below. TRON mainnet and Nile are excluded for now.
- Sandbox accepts testnets only, while Live accepts mainnets only. Live is disabled by default and is enabled by StableOps after the organization completes its risk and recovery-drill gates.
Sandbox and Live network boundaries are independently enforced when creating policies, registering wallets, creating intents, and issuing authorizations. A caller cannot cross environments by constructing a custom request.
Live networks
Ethereum
- Network ID
- eip155:1
- Contract or mint
- 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
- Asset
- USDC
- Decimals
- 6
Base
- Network ID
- eip155:8453
- Contract or mint
- 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
- Asset
- USDC
- Decimals
- 6
Arbitrum
- Network ID
- eip155:42161
- Contract or mint
- 0xaf88d065e77c8cc2239327c5edb3a432268e5831
- Asset
- USDC
- Decimals
- 6
Polygon
- Network ID
- eip155:137
- Contract or mint
- 0x3c499c542cef5e3811e1192ce70d8cc03d5c3359
- Asset
- USDC
- Decimals
- 6
Optimism
- Network ID
- eip155:10
- Contract or mint
- 0x0b2c639c533813f4aa9d7837caf62653d097ff85
- Asset
- USDC
- Decimals
- 6
BNB Smart Chain
- Network ID
- eip155:56
- Contract or mint
- 0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d
- Asset
- USDC
- Decimals
- 18
Solana
- Network ID
- solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
- Contract or mint
- EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
- Asset
- USDC
- Decimals
- 6
Sandbox networks
Ethereum Sepolia
- Network ID
- eip155:11155111
- Contract or mint
- 0x1c7d4b196cb0c7b01d743fbc6116a902379c7238
- Asset
- USDC
- Decimals
- 6
Base Sepolia
- Network ID
- eip155:84532
- Contract or mint
- 0x036cbd53842c5426634e7929541ec2318f3dcf7e
- Asset
- USDC
- Decimals
- 6
Arbitrum Sepolia
- Network ID
- eip155:421614
- Contract or mint
- 0x75faf114eafb1bdbe2f0316df893fd58ce46aa4d
- Asset
- USDC
- Decimals
- 6
Polygon Amoy
- Network ID
- eip155:80002
- Contract or mint
- 0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582
- Asset
- USDC
- Decimals
- 6
Optimism Sepolia
- Network ID
- eip155:11155420
- Contract or mint
- 0x5fd84259d66cd46123540766be93dfe6d43130d7
- Asset
- USDC
- Decimals
- 6
BNB Smart Chain Testnet
- Network ID
- eip155:97
- Contract or mint
- 0x64544969ed7ebf5f083679233325356ebe738930
- Asset
- USDC
- Decimals
- 18
Solana Devnet
- Network ID
- solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
- Contract or mint
- 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
- Asset
- USDC
- Decimals
- 6
BNB Smart Chain uses Binance-Peg USDC, while its testnet uses a community-pegged test token; neither should be described as Circle-issued USDC.
Signers and gas
- EIP-3009 networks use
LocalTestSignerin Sandbox andAwsKmsSignerin Live. The x402 facilitator submits the payment transaction, so the payer wallet does not need native tokens for each payment. - Permit2 networks use the local EVM test signer in Sandbox and AWS KMS in Live. The payer wallet must first approve the canonical Permit2 contract (
0x000000000022D473030F116dDEE9F6B43aC78BA3) to spend USDC. Approve only the allowance required by your treasury policy and verify the chain, token, spender, and amount before broadcasting. The wallet needs the network's native token for this approval's gas; the facilitator still submits subsequent x402 payments. - Solana uses
LocalSvmSigner. The facilitator fee payer covers transaction fees, so the payment wallet does not need SOL for x402 payments. AwsKmsSignersupports EVM networks only. A Solana private key remains in the customer environment and is used byLocalSvmSigner.
Amount units
Payment quotes, approvals, and receipts use the token decimals shown above. Policies and budgets always use a six-decimal USDC budget unit, where 1000000 means 1 USDC. On BNB Smart Chain, a 1 USDC payment amount is 1000000000000000000, while the corresponding policy limit remains 1000000.
Move from Sandbox to Live
Sandbox and Live are isolated environments. Do not reuse Sandbox Agents, Agent Keys, wallets, policies, budgets, signer instances, authorization stores, or idempotency keys in Live.
Before the first mainnet payment:
- Complete StableOps's organization risk review and recovery drill, then confirm Live is enabled with a healthy recipient-screening path.
- Create a Live Agent Payments management API key and new Live Agent. Register and bind a dedicated wallet on the exact mainnet.
- Recreate the policy and budgets using the six-decimal budget unit. Pin the production resource origin, recipient, network, and USDC contract from the tables above.
- Configure the signer with
environment: 'LIVE'and that mainnet's exact CAIP-2 identifier. Use a separate durable authorization store per signer instance. - For BNB Smart Chain, verify the Permit2 allowance and native-token gas balance. For every network, verify the wallet's USDC balance independently.
- Start with a deliberately small canary payment that requires human approval. Confirm the paid resource response, StableOps payment and receipt, signed Webhook, facilitator settlement, and wallet balance before enabling automatic payments.
An ak_sandbox_... Agent Key cannot access Live; issue and securely store a new ak_live_... key. A 403 mainnet-risk response means the organization has not completed activation. A 503 risk-screening response must fail closed and be escalated; do not retry by creating a second Intent.
Where to start
- To inspect a real
402challenge, open the online x402 test. - To complete your first controlled payment, follow the quickstart.
- After the basic flow, continue with the management SDK, signer, and Webhooks.
How is this guide?
Last updated