The Payment Layer for the AI Agent Economy
AgentPay is a payment layer for AI agents, making it possible to integrate your agents, move money between them, and test real payment flows end to end.
AgentPay gives every AI agent a wallet, a cryptographic identity, and governed spending - so your platform can monetize every agent action, automatically.
AgentPay gives developers one payment layer for agent identity, wallet state, policy checks, settlement routing, and receipts. Instead of stitching together separate systems, you integrate once and watch the full payment path in one place.
They still need a way to pay.
Calling tools is easy. Paying another agent, buying an API, and returning a receipt with policy and audit controls is the missing part. AgentPay closes that gap with one runtime.
Every autonomous agent needs to purchase APIs, data, compute, and services. Today they can't. AgentPay is the missing financial layer — and it's open for partners to build on.
Instead of stitching together wallet logic, approvals, rail routing, and receipts, AgentPay keeps the full payment path in one system.
Every payment request passes through a deterministic 7-stage pipeline. No shortcuts, no silent failures — every step is logged.
Bearer token
partial index
idempotency
velocity · lists
credit · COMMIT
timestamptz
event dispatch
This calls the running server, not a mock. Use it to confirm the API surface before opening the full Explorer.
This isn't a mock - it's calling the real running server. Select a read-only endpoint, click Run, and inspect the actual JSON response.
Select an endpoint
Choose from health check, dashboard stats, or the public A2A agent card.
Click Run
Live fetch against this server - real data, real latency, no write side effects.
See the response
Full JSON with syntax highlighting. No mock, no fixture.
Every payment follows the same visible path from agent request to posted transaction. Pick a scenario and replay the flow.
Pick a scenario and watch the payment packet move through policy, across the selected rail, and into the audit and webhook side effects in real time.
A four-act payment story inside the AgentPay runtime
The stage below keeps the same runtime anatomy as the explorer: origination, policy, settlement, and side effects. Switch scenarios to watch the system approve, hold, reroute, or block a payment without leaving the home page.
A terminal types the request, the packet folds into a signed envelope, and the payment story begins before a single rail is touched.
Budget, velocity, and allowlist checks resolve in sequence. Depending on the scenario, policy approves, holds for review, or blocks the packet before any funds move.
- The selected rail carries the value stream while the stage keeps payer, payee, amount, and route visible.
- Ledger writes, balance changes, and webhook dispatches happen as one transaction story instead of separate screenshots.
- Fallback and deny scenarios stay explicit, so the runtime behavior is just as visible when money does not take the happy path.
The trust story here is concrete: agent-scoped signing, atomic writes, replay-safe requests, and verifiable outbound events.
Every design decision prioritises correctness, auditability, and non-repudiation - the three things compliance teams ask for first.
Ed25519 Agent Identity
Every agent is issued a cryptographic keypair at registration. Payments are agent-signed. Identity is verifiable without a central registry - no shared secrets.
ACID Transactions
Every payment is a PostgreSQL transaction: BEGIN → debit → credit → audit → COMMIT. Partial writes are impossible. Failures roll back cleanly.
Immutable Audit Log
Every action - payment, refund, fund, policy evaluation - is appended to audit_log with timestamptz. Designed to meet SOC 2 and financial audit requirements.
Idempotency by Design
Sparse unique index on idempotency_key ensures retries never double-charge. Safe to retry at any layer of your stack without coordination.
Policy Engine
Spend limits, velocity controls, blocklists, allowlists, and time restrictions evaluated before every payment. Rules stored as JSONB - extend without schema migrations.
Webhook HMAC Signing
All outbound webhook payloads are HMAC-signed. Recipients can verify event authenticity without trusting the network - no replays, no spoofing.
Open source - fork it, audit it, own it
AgentPay is MIT licensed. No vendor lock-in, no proprietary black boxes, no usage-based licensing surprises. Read every line of code before you commit to anything. The commercial partnership is about velocity and revenue share - not holding your data hostage.
Repo surface
- MIT-licensed payment runtime with self-hostable PostgreSQL core.
- Browser explorer, dashboard, and transaction feed share the same live data plane.
- Partners can audit the implementation before they decide how deeply to embed it.
Start with a sandbox payment, move to a real agent-to-agent flow, then add policy, receipts, and deployment controls as your runtime hardens.
No lengthy onboarding and no proprietary SDK lock-in. The rollout path stays visible from first sandbox payment through deployment review.
Sandbox access & first API call
Clone the repo, start Docker, run npm run seed. Two funded agents ready in under 5 minutes.
First payment in your platform
Integrate agent registration and wallet funding into your onboarding flow. First real payment processed and logged.
Policies & webhooks configured
Spend limits tuned to your use case. Webhooks firing to your dashboard. Audit log flowing to your data pipeline.
Production deployment
Docker Compose or Kubernetes. PostgreSQL pool sized for your load. Revenue share flowing from day one.
Start with the places where agents already spend money: buying APIs, funding task-specific workflows, and embedding payments into platforms.
Three real operating patterns — before the payment layer existed, and after.
API and data purchases
Give agents a direct way to buy premium endpoints, reports, model calls, and data feeds when the task requires it.
Metered usageOperational agent workflows
Fund sub-agents, approve routine vendor spend, and keep policy, ledger, and receipts inside the same runtime.
Workflow controlPlatform and marketplace billing
Embed payment-aware agents into your product so usage, margin, and settlement show up as one system feature.
Platform revenueA data marketplace that billed by the month had no way to charge AI agents by the call
A supply chain team's procurement bot required human sign-off on every invoice under $5 000
An orchestrator spawning specialist sub-agents had no way to allocate budget between them
The core runtime is live today. The next work is better developer tooling, more rails, and stronger scale primitives.
Core payment engine
Agent identity, managed wallets, 5-rail payments, policy engine, webhooks, audit log, analytics.
x402 + AP2 protocols
Full x402 HTTP payment flow and Google AP2 Verifiable Digital Credentials — agents pay for resources autonomously with cryptographic proof.
Live API explorer
Browser-based interactive docs — all endpoints testable without curl or Postman.
Service marketplace
Provider agents register callable services with pricing and SLA contracts. Consumer agents discover, authorize, and pay via x402 tokens. Per-service trust_score updated after every settled call.
Dispute resolution
Structured dispute lifecycle — open, evidence submission, operator review, and automatic consumer refund on resolution. Fee is retained on all outcomes.
Payout routing
Agents withdraw to bank (ACH), on-chain crypto, or Stripe connected accounts. Asynchronous settlement with webhook events on completion.
TypeScript SDK
Type-safe client SDK for Node.js and browser. Auto-generated from OpenAPI spec with full type coverage.
OpenAPI / Swagger spec
Machine-readable API spec. Auto-generates client libraries for Python, Go, and TypeScript.
WebSocket real-time events
Replace polling with push. Dashboard and transaction feed update instantly on every payment.
Lightning Network rail
Sub-second Bitcoin micropayments. Natural fit for AI agents making thousands of small payments.
Multi-currency & FX
USDC, EUR, GBP support with live FX conversion. Agents operate in any currency, settle in any currency.
PgBouncer & partitioning
Connection pooling at scale + partition transactions by month for hot/cold data tiering.
Start with the same runtime, then decide whether you want to embed it, expose it as a platform feature, or run it inside your own environment.
Whether you're embedding payment infrastructure, building on top of it, or deploying at enterprise scale — there's a model for you.
- ✓White-label wallet API + UI
- ✓Revenue share on transaction fees
- ✓Dedicated sandbox environment
- ✓Co-branded documentation
- ✓Priority support SLA
- ✓Everything in Integration
- ✓Custom payment rails
- ✓Shared go-to-market support
- ✓Joint case study & PR
- ✓Dedicated integration engineer
- ✓On-premise or VPC deployment
- ✓Custom compliance & audit rules
- ✓Dedicated engineering support
- ✓Custom policy engine rules
- ✓Uptime SLA guarantee
Use this form to report friction in the explorer, gaps in the API, confusing flows, or anything real users keep tripping over. We can route product, developer, and operator feedback through the same intake.
Feedback form
Thanks. Your feedback is in.
We review these notes as we iterate on the explorer, API, and onboarding flow.
Ready to try agent-to-agent payments?
Start in the sandbox, inspect the live API, and decide how you want to connect your own agents.
MIT License · No vendor lock-in · PostgreSQL 16 · Node.js 20