The facilitator for INK blockchain. Accept USDC payments between agents, APIs, and services with one endpoint. No API keys. No gas. No blockchain code.
Why Castar Facilitator
Everything you need to monetize APIs and services with USDC on INK. Built for developers and AI agents.
x402 is designed for programmatic payments. AI agents with wallets pay for API access autonomously — no human intervention.
Add payment middleware to your Express, Hono, or Axum server. Set your price. The facilitator handles everything else.
Settle payments in USDC on Kraken's Layer 2. Fast, cheap, and backed by real dollars. Chain ID 57073.
No registration, no dashboard, no API keys. Point your server at the facilitator URL and start accepting payments.
The facilitator never holds funds. It only executes pre-authorized EIP-3009 transfers signed by the payer.
Payments verify and settle on INK in under a second. Your server gets a receipt with the transaction hash.
Integration
See how easy it is to add x402 payments to your server and client.
// Your Express server - no payments
import express from 'express';
const app = express();
app.get('/api/data', (req, res) => {
res.json({ data: 'free access' });
});
app.listen(3000);// Add x402 payments in 3 lines
import express from 'express';
import { paymentMiddleware } from 'x402-express';
const app = express();
app.use('/api/data', paymentMiddleware({
facilitatorUrl: 'https://relay.castar.tech',
network: 'ink',
amount: 0.01,
token: 'USDC',
recipient: '0xYourAddress',
}));
app.get('/api/data', (req, res) => {
res.json({ data: 'paid access' });
});
app.listen(3000);// Standard fetch — gets 402 error const response = await fetch( 'https://api.example.com/api/data' ); // Error: 402 Payment Required console.log(response.status); // 402
// x402 fetch — auto-pays and retries
import { withX402Payment } from 'x402-fetch';
const response = await withX402Payment(
fetch('https://api.example.com/api/data'),
{
wallet: signer,
network: 'ink',
}
);
// Paid & received
const data = await response.json();The Protocol
Your server says “pay me.” The client pays. The facilitator verifies and settles on INK. No redirects, no checkout pages.
Your server responds with HTTP 402 on a paid route. The header includes price, token (USDC), and your INK recipient address.
The client reads the payment requirement, signs a USDC authorization with their wallet, and retries the request.
Castar Facilitator validates the signature, amount, token, expiration, and on-chain state on INK.
The facilitator submits the USDC transfer via EIP-3009, returns a receipt with the txHash, and your server grants access.
API Reference
Available on this facilitator instance. Use these for custom integrations or to inspect the payment flow.
Submit a signed payment for verification. Checks signature, amount, token, and on-chain state.
Settle an accepted payment on-chain. Returns a receipt with the transaction hash.
Lists all payment kinds this facilitator supports — schemes, chains, and versions.
Health check. Returns 200 when the facilitator is running and ready.
Prometheus metrics endpoint. Tracks settlements, verifications, latency, and uptime.
JSON stats for the landing page. Returns settlement count and uptime seconds.
Facilitator Base URL
https://relay.castar.tech
0
Settlements
1.2s
Avg Settlement
99.97%
Uptime
Castar · x402
Set one environment variable. Choose INK as your network. Deploy. The facilitator handles the rest.