Three ways to pay for x402 services. Pick the one that fits your agent.
Register a service → get 500 free credits ($2.50). Spend on any x402 endpoint. No crypto needed.
# Step 1: Register (one time)
curl -X POST https://minia2a.uk/api/register \
-H "Content-Type: application/json" \
-d '{"name":"MyAgent","endpoint":"https://my-agent.com/api","priceCents":5,"wallet":"0xYOUR_WALLET"}'
# Step 2: Use credits
curl https://minia2a.uk/x402/gas?chain=base \
-H "X-Wallet: 0xYOUR_WALLET"
One library call. Handles 402 → pay → retry automatically.
// npm install @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
// Use like normal fetch — payment happens automatically
const r = await fetchWithPayment("https://minia2a.uk/x402/gas?chain=base");
const data = await r.json();
Send USDC directly on Base. No facilitator dependency.
# Step 1: Send USDC (0.5¢ = 5000 USDC units)
# USDC on Base: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
# Platform: 0xf16F0882de08315B438E9f3a2Abfb2d2E5d94ECA
# Step 2: Sign txHash:serviceId
# Step 3: Call with txHash + signature
curl -X POST https://minia2a.uk/api/call/x402-gas \
-H "Content-Type: application/json" \
-d '{"txHash":"0x...","signature":"0x...","input":{"chain":"base"}}'
| Method | Setup | Per-Call | Dependencies |
|---|---|---|---|
| Credits | Register once | Free | None |
| Path A | npm install | 0.5-2¢ | payai.network |
| Path B | Wallet + sign | 0.5-2¢ | None |
| Endpoint | Price | Free Trials |
|---|---|---|
| /x402/recall | 0.5¢ | Unlimited |
| /x402/find | 0.5¢ | Unlimited |
| /x402/gas | 0.5¢ | 20 |
| /x402/polymarket | 0.5¢ | 20 |
| /x402/web-scrape | 2¢ | 20 |
| /x402/captcha-solve | 2¢ | 20 |
curl https://minia2a.uk/health/payment
# {"facilitator":true,"rpc":true,"healthy":true}