Secure multi-chain cryptocurrency payment gateway for AI agents and autonomous systems, based on x402 and AP2 protocols.
agentgatepay is an early-stage project in the AI payments / x402 ecosystem, focused on agent-economy, ap2-mandates, autonomous-agents, base. It currently has 1 GitHub stars and 1 forks, and sits alongside related tools like TX, RequestTap-Router, RequestTap-Router, x402-wiki, x402charity, clicks-protocol.
Payment Gateway for the Agent Economy
AgentGatePay enables AI agents to autonomously send and receive payments using blockchain technology. Designed for agent-to-agent and agent-to-merchant transactions with enterprise-grade security.
Beta Release | Multi-Chain (Ethereum, Base, Polygon, Arbitrum) | Multi-Token (USDC, USDT, DAI)
📊 New to AgentGatePay? Start with our Visual Introduction (PDF) - a 9-slide visual guide explaining everything in minutes!
AgentGatePay is currently in BETA. By using this service, you acknowledge and accept:
📄 Read the full DISCLAIMER.md before using AgentGatePay.
BY USING THIS SERVICE, YOU AGREE TO THESE TERMS. IF YOU DO NOT AGREE, DO NOT USE AGENTGATEPAY.
AgentGatePay is a payment infrastructure layer for AI agents. It enables autonomous economic interactions where agents can:
Built on blockchain technology for permissionless, programmable, and global payments.
AI agents are becoming increasingly capable of autonomous decision-making, but there's a critical bottleneck: they can't pay for things.
Today's AI agents face a fundamental problem:
Agents need to buy services autonomously, but traditional payment systems won't let them.
Credit Cards & Traditional Payment Processors:
Bank Transfers & Wire Payments:
The Result: AI agents can't be truly autonomous because they need humans to handle every payment.
Without payment infrastructure, the agent economy can't exist:
No Autonomous Agent Services
No Agent-to-Agent Commerce
No Micropayments
No Budget Control
No Global Access
The fundamental issue: Traditional finance was built for humans with identities, not for autonomous software agents.
We built the first payment gateway specifically designed for AI agents, addressing each problem directly:
Blockchain-based payments eliminate identity requirements:
AP2 Mandate Protocol enables true agent autonomy:
Example: Give agent $100 budget for "research" valid for 7 days → agent operates autonomously within limits.
Blockchain settlement makes $0.01 payments economically viable:
Comparison:
Multi-chain blockchain support:
AIF (Agent Interaction Firewall) - the first security system built for AI agents:
Traditional systems protect against human fraud. AIF protects agents from malicious agents.
Google AP2 (Agent Payment Protocol v2):
x402 Coinbase (HTTP 402 Payment Required):
These protocols are open and can be implemented by anyone building agent infrastructure.
1. Built Specifically for Agents
2. Production-Ready Today
3. Developer-First
4. Our Effort
Beta status means we're actively improving based on real-world usage. We're responsive, we iterate fast, and we're committed to solving this problem.
Today (without AgentGatePay):
Human → Manually pay for API
→ Agent uses API
→ Agent completes task
→ Human pays again for next task
Tomorrow (with AgentGatePay):
Human → Give agent $100 budget
→ Agent autonomously:
- Buys API access ($0.50)
- Purchases data ($2.00)
- Pays for compute ($5.00)
- Uses specialized AI service ($1.50)
- Completes entire project
→ Human reviews results
→ Budget remaining: $91.00
1. Autonomous Agent Services
2. Agent Marketplaces
3. Micropayment Business Models
4. Multi-Agent Collaboration
5. Global Agent Workforce
We believe the agent economy will be massive:
Traditional payment systems can't support this. They're too slow, too expensive, too restricted to humans.
AgentGatePay is the infrastructure layer that makes it possible.
What you need:
/v1/users/signup)Choose your integration method:
| Method | Best For | Setup Time |
|---|---|---|
| SDK (Recommended) | Production apps, type safety | 10 minutes |
| REST API | Any language, full control | 15 minutes |
| MCP Tools | Claude Desktop, OpenAI agents | 5 minutes |
Core Payment Flow:
1. Create Mandate → POST /mandates/issue → get budget authorization
2. Request Resource → GET /x402/resource → receives 402 + payment details
3. Sign Transaction → Send USDC to seller's wallet → get tx_hash
4. Submit Proof → GET /x402/resource (with tx_hash) → get resource
5. Track Spending → GET /v1/analytics/me → view budget remaining
Endpoints you'll use:
Setup (one-time):
POST /v1/users/signup - Create account → get API keyPOST /mandates/issue - Set budget ($10) → get mandate tokenFor each purchase:
3. GET /x402/resource - Request resource → receive price & wallet address
4. Send blockchain transaction → USDC transfer to seller
5. GET /x402/resource - Submit tx_hash → receive resource instantly
Monitoring:
6. GET /v1/analytics/me - Check spending & remaining budget
Quick links:
pip install agentgatepay-sdknpm install agentgatepay-sdkWhat you need:
/v1/users/signup)Choose your integration method:
| Method | Best For | Setup Time |
|---|---|---|
| SDK (Recommended) | Production apps, type safety | 10 minutes |
| REST API | Any language, full control | 15 minutes |
| MCP Tools | Claude Desktop, OpenAI agents | 5 minutes |
Core Payment Flow (No webhooks needed):
1. Buyer Request → GET /resource?resource_id=X
2. Return 402 → Your API: "Price is $0.01, send to wallet 0xABC..."
3. Buyer Pays → Blockchain transaction happens
4. Buyer Submits → GET /resource with x-payment header (tx_hash)
5. You Verify → Call: GET /v1/payments/verify/{tx_hash}
6. Deliver Resource → Return resource data if verified
Endpoints you'll use:
Setup (one-time):
POST /v1/users/signup - Create account → get API keyPOST /v1/users/wallets/add - Register your wallet → start receivingFor each sale:
3. GET /v1/payments/verify/{tx_hash} - Verify buyer paid → returns true/false
4. Return resource data if verified → sale complete
Optional (for automation):
5. POST /v1/webhooks/configure - Auto-notify on payments (production optimization)
6. GET /v1/payments/list - Batch check multiple payments
7. GET /v1/merchant/revenue - View earnings dashboard
Quick links:
pip install agentgatepay-sdknpm install agentgatepay-sdk┌─ I'm building an AI agent ─────────────────────────┐
│ │
│ ├─ Using Claude Desktop? ───→ Use MCP Tools │
│ │ (5 min setup) │
│ │ │
│ ├─ Using LangChain/AutoGPT? ──→ Use SDK │
│ │ (Python/JS) │
│ │ │
│ └─ Custom framework? ─────────→ Use REST API │
│ (Any language) │
└─────────────────────────────────────────────────────┘
┌─ I'm building a web app ───────────────────────────┐
│ │
│ ├─ Node.js/TypeScript? ───────→ Use JS SDK │
│ │ (npm install) │
│ │ │
│ ├─ Python/Django/Flask? ───────→ Use Python SDK │
│ │ (pip install) │
│ │ │
│ └─ Other language? ────────────→ Use REST API │
│ (curl/http client) │
└─────────────────────────────────────────────────────┘
┌─ I want zero-code automation ──────────────────────┐
│ │
│ └─ Use n8n workflows ──────────→ Import JSON │
│ (drag & drop) │
└─────────────────────────────────────────────────────┘
1. Issue Mandate → Agent creates budget authorization
2. Request Resource → Agent requests paid content (402 Payment Required)
3. Submit Payment → Agent sends blockchain transaction
4. Access Resource → Gateway verifies & grants access (200 OK)
1. Agent Sends Payment → Direct blockchain transaction
2. Gateway Verifies → On-chain verification
3. Webhook Notification → Merchant receives instant alert
4. Merchant Delivers → Service/resource provided to agent
You maintain full control at all times:
What AgentGatePay provides:
AgentGatePay is the middle man that:
You are responsible for:
AgentGatePay does not:
For enterprise compliance questions, consult with your legal and compliance teams about blockchain payment regulations in your jurisdiction.
This service is legal because it's non-custodial - users control their own keys, wallets, and transactions. We simply verify and provide security infrastructure.
5-minute setup to send your first payment:
# 1. Create account
curl -X POST https://api.agentgatepay.com/v1/users/signup \
-H "Content-Type: application/json" \
-d '{
"email": "your-email@example.com",
"password": "secure-password",
"account_type": "agent"
}'
# 2. Issue mandate (use API key from signup response)
curl -X POST https://api.agentgatepay.com/mandates/issue \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "your-wallet-address",
"budget_usd": "10.00",
"scope": "research",
"ttl_minutes": 1440
}'
# 3. Make payment (see full example in buyer guide)
For agents or merchants receiving payments - 5-minute setup:
# 1. Create merchant account
curl -X POST https://api.agentgatepay.com/v1/users/signup \
-H "Content-Type: application/json" \
-d '{
"email": "merchant@example.com",
"password": "secure-password",
"account_type": "merchant"
}'
# 2. Add your wallet address
curl -X POST https://api.agentgatepay.com/v1/users/wallets/add \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"wallet_address": "0xYourEthereumAddress"}'
# 3. Configure webhook (optional)
curl -X POST https://api.agentgatepay.com/v1/webhooks/configure \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_wallet": "0xYourEthereumAddress",
"webhook_url": "https://your-server.com/webhook"
}'
# 4. Verify payments
curl https://api.agentgatepay.com/v1/payments/verify/TX_HASH \
-H "x-api-key: YOUR_API_KEY"
Complete Seller Guide (for agents & merchants)
Connect Claude Desktop, OpenAI, or any MCP-compatible platform:
# For Claude Desktop - add to config:
{
"mcpServers": {
"agentgatepay": {
"command": "node",
"args": ["/path/to/agentpay-mcp-server.js"],
"env": {
"API_KEY": "your-api-key",
"WALLET_PRIVATE_KEY": "your-private-key"
}
}
}
}
# For OpenAI - use unified JSON-RPC endpoint:
POST https://mcp.agentgatepay.com/
See MCP Tools Reference for complete integration guide.
AI agents that purchase API access, data, or compute resources without human intervention.
Example: Research agent with $100 budget, autonomously purchases data from multiple providers.
Platforms where agents buy and sell services with instant settlement.
Example: AI service marketplace with automatic payment verification and instant access.
Pay-per-use pricing for AI services with blockchain settlement.
Example: $0.01 per query to a specialized AI model, settled in seconds.
Teams of agents collaborating and transacting with budget controls.
Example: Project management agent delegates tasks to specialist agents, tracking budget in real-time.
AgentGatePay is built on two innovative payment protocols:
Cryptographic authorization protocol for agent payments with budget controls. Enables agents to operate with pre-authorized spending limits using Ed25519 signatures and JWT-like tokens.
Key capabilities:
Extension of the HTTP protocol for payment-required resources. Implements the standardHTTP 402 status code for blockchain-based microtransactions.
Key capabilities:
Fast integration with type-safe libraries:
# JavaScript/TypeScript
npm install agentgatepay-sdk
# Python
pip install agentgatepay-sdk
Direct HTTP integration with any language:
API Reference | Postman Collection
For Claude Desktop, OpenAI, and MCP-compatible platforms:
Full production-ready examples in the Examples Repository:
We create framework-specific examples based on user demand.
Currently available:
Request examples for your framework:
How to request: Email support@agentgatepay.com with:
We prioritize examples based on demand. If multiple users request the same framework, we'll build and publish the example within days.
Import the complete API collection for testing:
See Postman Guide for setup instructions.
Manual testing with curl:
Curl Examples - 30+ ready-to-run commands.
| Chain | Chain ID | USDC | USDT | DAI |
|---|---|---|---|---|
| Ethereum | 1 | Yes | Yes | Yes |
| Base | 8453 | Yes | Yes | Yes |
| Polygon | 137 | Yes | Yes | Yes |
| Arbitrum | 42161 | Yes | Yes | Yes |
Rate limits are enforced per-endpoint to prevent abuse:
| Endpoint | Rate Limit |
|---|---|
/mandates/issue |
20 req/min |
/mandates/verify |
100 req/min |
/x402/resource |
60 req/min |
| Other endpoints | 60 req/min |
Rate limit headers included in all responses:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Requests remaining in windowX-RateLimit-Reset: Unix timestamp when window resetsAgentGatePay is currently in beta.
We're actively seeking feedback! This is a new and rapidly evolving space. We're building payment infrastructure for the agent economy and want to hear from developers, agent builders and early adopters about what works and what needs improvement.
Share your feedback:
Current Limitations:
Coming Soon (High Priority):
Your feedback shapes our roadmap. We prioritize features based on real-world developer needs and use cases. Email us at support@agentgatepay.com with feature requests or suggestions.
See docs/README.md for complete documentation index.
AgentGatePay is currently in beta. We welcome feedback and bug reports via email at support@agentgatepay.com.
Copyright (c) 2025 AgentGatePay. All Rights Reserved.
This documentation is proprietary to AgentGatePay. See LICENSE for full terms.
AgentGatePay uses a dual licensing approach designed to protect our core infrastructure while enabling developers to freely use and modify integration examples:
| Repository | License | Purpose |
|---|---|---|
| agentgatepay | Proprietary | Documentation & specifications |
| agentgatepay-sdks | MIT License | Official Python & JavaScript libraries |
| TX | Proprietary | Transaction signing service |
| agentgatepay-examples | MIT License | Integration examples & workflows |
Why This Approach?
Infrastructure Protection (Proprietary):
Developer Freedom (MIT License):
What This Means for You:
Questions? Email support@agentgatepay.com for licensing inquiries.
AgentGatePay - Payment infrastructure for the agent economy. Currently in beta - we're actively improving based on real-world usage and developer feedback. Your feedback helps our roadmap.
ayment gateway router for AI agents - autonomous crypto payments with AP2 mandates and x402 protocol
Open Source x402 API Router. Instantly turn any API into a USDC pay-per-request Service for AI Agents.
🚦 Enable APIs as USDC pay-per-request services for AI with the open-source RequestTap x402 Router in Node.js and TypeScript.
The x402 Service Encyclopedia — Every service ranked, reviewed, and documented. Community knowledge base for the AI agent economy.
Automatic micro-donations powered by x402. Drop-in Express/Next.js middleware that sends USDC to charities on every user action. npm install x402charity.
Agent commerce settlement router for AI agents on Base. Split USDC into liquid working capital and routed yield.
Lucid Agents Commerce SDK. Bootstrap AI agents in 60 seconds that can pay, sell, and participate in agentic commerce supply chains. Our protocol agnostic SDK provides CLI-generated templates and drop-in adapters for Hono, Express, Next.js, and TanStack, giving you instant access to crypto/fiat payment rails (AP2, A2A, x402, ERC8004).
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Skills & plugins for agentic commerce : UCP, ACP, AP2, A2A, WebMCP, Magento 2, BigCommerce, WooCommerce
Trust infrastructure for million-agent economies on Solana - identity, reputation, and validation designed for continuous feedback at scale.
A chain-agnostic AI-native payment infrastructure, authz layer for x402