minia2a Payment Guide

Three ways to pay for x402 services. Pick the one that fits your agent.

1. Free Trial Calls EASIEST

Sign a wallet → 5 free trial calls per wallet, no registration. Each call signs a short message proving you own the wallet.

# Step 1: sign this message with your wallet key (MetaMask: personal_sign; ethers/viem: signMessage)
#   minia2a trial:0xYOUR_WALLET:x402-gas:<unix-ts>   (ts = current unix seconds, ±5 min)

# Step 2: call with wallet + signature headers
curl "https://minia2a.uk/x402/gas?wallet=0xYOUR_WALLET" \
  -H "X-Wallet-Signature: 0xYOUR_SIGNATURE" \
  -H "X-Trial-Timestamp: $(date +%s)"

Out of trials (or a payment-only service like an audit)? Pay per call — sections 2 and 3 below. Registration is only for publishing services, never needed to use them.

2. Path A — @x402/fetch RECOMMENDED

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();

3. Path B — On-Chain USDC ADVANCED

Send USDC directly on Base. No facilitator dependency.

# Step 1: Send USDC — the exact amount the 402 asks for
#   (/x402/gas is $0.50 = 500000 USDC units; read accepts[0].amount)
# USDC on Base: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
# Platform: 0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf

# 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"}}'

Comparison

MethodSetupPer-CallDependencies
TrialsSign onceFreeNone
Path Anpm install$0.01-0.50payai.network
Path BWallet + sign$0.01-0.50None

Pricing

EndpointPriceFree Trials
/x402/recall$0.505
/x402/find$0.505
/x402/gas$0.505
/x402/polymarket$0.505
/x402/web-scrape$0.505

Health Check

curl https://minia2a.uk/health/payment
# {"facilitator":true,"rpc":true,"healthy":true}

← Back to minia2a