Load balancer and proxy for Cronos x402 facilitator with circuit breaker and retry logic
facilitator is an early-stage TypeScript project in the AI payments / x402 ecosystem. It currently has 0 GitHub stars and 0 forks.
High-availability passthrough proxy for Cronos x402 facilitators with automatic failover.
Production URL: https://facilitator.cronos402.dev
The Facilitator Proxy provides a reliable, high-availability interface to the Cronos x402 facilitator service. It implements automatic failover, retry logic, and load balancing across multiple upstream facilitator endpoints, ensuring payment verification and settlement requests succeed even during network issues or upstream downtime.
facilitator.cronoslabs.org (Cronos official)Additional upstreams can be configured for redundancy.
Proxied x402 facilitator endpoints:
Get supported payment schemes and networks.
Response:
{
"networks": ["cronos-testnet", "cronos-mainnet"],
"assets": {
"cronos-testnet": ["devUSDC.e", "TCRO"],
"cronos-mainnet": ["USDC.e", "CRO"]
}
}
Verify a payment authorization.
Request:
{
"type": "transfer_with_authorization",
"from": "0x...",
"to": "0x...",
"value": "1000000",
"validBefore": 1234567890,
"signature": "0x..."
}
Settle a verified payment on-chain.
Request:
{
"type": "transfer_with_authorization",
"from": "0x...",
"to": "0x...",
"value": "1000000",
"validBefore": 1234567890,
"signature": "0x..."
}
Default settings:
Configure via environment variables:
UPSTREAM_URL=https://facilitator.cronoslabs.org/v2/x402
MAX_RETRIES=3
TIMEOUT_MS=10000
ENABLE_CACHING=true
CACHE_TTL=60
pnpm install
pnpm dev
Server runs on http://localhost:3004
Proxy health check.
Response:
{
"status": "healthy",
"uptime": 12345,
"upstreams": {
"facilitator.cronoslabs.org": "healthy"
}
}
Detailed upstream status with latency metrics.
Response:
{
"upstreams": [
{
"url": "https://facilitator.cronoslabs.org",
"status": "healthy",
"latency": 45,
"lastCheck": "2024-01-22T12:00:00Z"
}
]
}
Custom headers added by proxy:
X-Proxy-Target: Upstream target that handled the requestX-Proxy-Attempt: Retry attempt number (1-3)X-Proxy-Timestamp: Request timestampX-Cache-Status: Cache hit/miss statuspnpm build
NODE_ENV=production pnpm start
FROM node:20-alpine
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
EXPOSE 3004
CMD ["pnpm", "start"]
The proxy provides Prometheus-compatible metrics:
MIT
Production-ready x402 facilitator server.
Rust SDK for the x402 payment protocol.
Accept payments from AI agents. Open-source. Your data, your domain, your rules. Free forever.
A production-ready payment settlement service for the x402 protocol. Built with Elysia and Node.js, it verifies cryptographic payment signatures and settles transactions on-chain for EVM, SVM (Solana), and Starknet networks.
Golang implementation of an x402 payment facilitator
x402 payment facilitator — verifies and settles EIP-3009 USDC micropayments on Base, Arbitrum, and Ethereum.