ayment gateway router for AI agents - autonomous crypto payments with AP2 mandates and x402 protocol
TX is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on agent-economy, ai-agents, ap2-mandates, autonomous-agents. It currently has 1 GitHub stars and 0 forks, and sits alongside related tools like agentgatepay, crewai-x402, langchain-x402, RequestTap-Router, RequestTap-Router, x402-pay.
Secure blockchain transaction signing service with mandatory commission enforcement
Production-ready deployment for autonomous AI agent payments. Enables agents to make payments without exposing private keys in client code.
AgentGatePay is currently in BETA. By using this transaction signing service and AgentGatePay, you acknowledge and accept:
📄 Read the full DISCLAIMER.md before deploying this service.
BY USING THIS SERVICE, YOU AGREE TO THESE TERMS.
The TX Signing Service is an external transaction signing server that handles blockchain payments on behalf of AI agents. Instead of embedding wallet private keys in client applications, agents make API calls to this service which signs and submits transactions securely.
Key Features:
When AI agents sign transactions directly, you must:
With the TX Signing Service:
Choose your deployment method:
Fastest way to get started - 3 minutes from zero to production.
Setup:
AGENTGATEPAY_API_KEY (get one here)WALLET_PRIVATE_KEYhttps://your-service.onrender.comSee: tx-signing-service/README.md for complete Render deployment guide.
Best for self-hosting - Full control over infrastructure.
# Pull from Docker Hub
docker pull agentgatepay/tx-signing-service:latest
# Run with docker-compose
docker-compose up -d
# Check health
curl http://localhost:3000/health
See: docker/README.md for Docker deployment guide with Kubernetes and ECS examples.
Alternative one-click option - Similar to Render.
See: tx-signing-service/README.md for Railway-specific instructions.
1. AI Agent → Requests payment signing from TX Service
↓
2. TX Service → Verifies API key (owner protection)
↓
3. TX Service → Fetches commission config from AgentGatePay
↓
4. TX Service → Calculates split: 0.5% commission + 99.5% merchant
↓
5. TX Service → Signs TWO transactions:
• Commission → AgentGatePay wallet
• Payment → Merchant wallet
↓
6. TX Service → Returns both transaction hashes to agent
↓
7. AI Agent → Submits tx_hash to AgentGatePay for verification
Why This is Secure:
Owner Protection
Server-Controlled Commission
Private Key Isolation
Hardcoded API URL
GET /healthHealth check endpoint (no authentication required).
Response:
{
"status": "healthy",
"version": "4.0.0",
"mode": "secure_server_fetched_config",
"owner_protection": "enabled",
"supported_chains": ["base", "ethereum", "polygon", "arbitrum"],
"supported_tokens": ["USDC", "USDT", "DAI"]
}
POST /sign-paymentSign payment with automatic two-transaction commission enforcement.
Headers:
x-api-key: pk_live_your_api_key_here
Content-Type: application/json
Request:
{
"merchant_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"total_amount": "15000000",
"token": "USDC",
"chain": "base"
}
Response:
{
"success": true,
"tx_hash": "0xabc...merchant",
"tx_hash_commission": "0xdef...commission",
"merchant_amount": "14925000",
"commission_amount": "75000",
"commission_rate": 0.005,
"commission_controlled_by": "agentgatepay",
"explorerUrl": "https://basescan.org/tx/0xabc...",
"explorerUrlCommission": "https://basescan.org/tx/0xdef..."
}
What Happens:
| Variable | Description | Example |
|---|---|---|
WALLET_PRIVATE_KEY |
Your wallet private key | 0xabcd1234... |
AGENTGATEPAY_API_KEY |
Your AgentGatePay API key | pk_live_abc123... |
| Variable | Description | Default |
|---|---|---|
BASE_RPC |
Base RPC endpoint | https://mainnet.base.org |
ETHEREUM_RPC |
Ethereum RPC endpoint | https://cloudflare-eth.com |
POLYGON_RPC |
Polygon RPC endpoint | https://polygon-rpc.com |
ARBITRUM_RPC |
Arbitrum RPC endpoint | https://arb1.arbitrum.io/rpc |
PORT |
Service port | 3000 |
Note: Default RPC endpoints work great for most users. Only change if you have premium RPC providers (Alchemy/Infura).
| Chain | Chain ID | USDC | USDT | DAI | Settlement Speed |
|---|---|---|---|---|---|
| Base | 8453 | ✅ | ❌ | ✅ | 2-5 seconds |
| Polygon | 137 | ✅ | ✅ | ✅ | 3-8 seconds |
| Arbitrum | 42161 | ✅ | ✅ | ✅ | 3-8 seconds |
| Ethereum | 1 | ✅ | ✅ | ✅ | 15-60 seconds |
curl https://your-service.onrender.com/health
Expected: {"status": "healthy", ...}
# Test with WRONG API key (should fail)
curl -X POST https://your-service.onrender.com/sign-payment \
-H "x-api-key: pk_live_WRONG_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"total_amount": "15000000",
"token": "USDC",
"chain": "base"
}'
Expected: 403 Forbidden
# Test with CORRECT API key (should succeed with 2 TX)
curl -X POST https://your-service.onrender.com/sign-payment \
-H "x-api-key: YOUR_CORRECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"total_amount": "15000000",
"token": "USDC",
"chain": "base"
}'
Expected: Two transaction hashes (commission + merchant)
Visit block explorer to verify transactions:
Commission Transaction:
https://basescan.org/tx/TX_HASH_COMMISSION
Verify:
Merchant Transaction:
https://basescan.org/tx/TX_HASH
Verify:
Cause: Environment variable not set.
Fix:
WALLET_PRIVATE_KEY0x...)Cause: Wrong API key or API key not configured.
Fix:
AGENTGATEPAY_API_KEY is set correctly in environmentcurl -H "x-api-key: YOUR_KEY" https://api.agentgatepay.com/v1/users/meCause: API key invalid or AgentGatePay API unreachable.
Fix:
curl -H "x-api-key: YOUR_KEY" https://api.agentgatepay.com/v1/users/meAGENTGATEPAY_API_KEY env var is setCause: Wallet doesn't have enough USDC/USDT/DAI or native token for gas.
Fix:
https://basescan.org/address/YOUR_WALLETFor maximum security, move environment variables to Secret Files:
See: tx-signing-service/README.md#optional-use-secret-files-for-extra-security
Benefits:
Firewall Rules:
Set up alerts:
Recommended: Rotate AgentGatePay API keys every 90 days
How:
/v1/api-keys/createAGENTGATEPAY_API_KEY environment variable/v1/api-keys/revoke| Platform | Free Tier | Paid Tier | Best For |
|---|---|---|---|
| Render | 750 hours/month | $7/month | Quick start |
| Railway | $5 credit/month | $5-20/month | Developer-friendly |
| Docker (AWS ECS) | Free tier available | $10-30/month | Full control |
| Docker (self-host) | Free | Server costs only | Maximum control |
Blockchain Gas Costs (separate):
Scenario: LangChain agent needs to make autonomous payments
Without TX Service:
With TX Service:
Scenario: 10 different agents need to make payments
Without TX Service:
With TX Service:
Scenario: External developers integrate with AgentGatePay
Without TX Service:
With TX Service:
Copyright (c) 2025 AgentGatePay. All Rights Reserved.
See LICENSE for full terms.
AgentGatePay TX Signing Service - Secure blockchain transaction signing for autonomous AI agents.
Current Version: v4.0.0 Security Model: Server-controlled commission enforcement Bypass Protection: Impossible ✅
Secure multi-chain cryptocurrency payment gateway for AI agents and autonomous systems, based on x402 and AP2 protocols.
CrewAI integration for x402 payments - autonomous agent crews that pay for APIs with USDC
LangChain integration for x402 payments - let AI agents pay for APIs with USDC automatically
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.
Open-source x402 payment processor for AI agents. Sub-400ms settlement on Solana + 7 EVM chains. Let LLMs pay for APIs programmatically with USDC. npm: nory-x402
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