How to pay (x402, USDC on Base)
Each paid call costs a fixed amount in USDC on Base mainnet, paid inline over HTTP with x402 v2. There is no account, API key, subscription or minimum. Prices are fixed; there is no time-limited offer.
1. Try it free first
- The calculator on the home page is free.
- Free demo endpoints:
/api/free/<route>(same handler as/v1/<route>), rate limited to about 8 requests per minute per IP, meant for interactive use. Example:/api/free/settlement-date?trade_date=2026-12-24. - MCP at
https://business-days.quietworklabs.workers.dev/mcp: the first 5 calls per day per client per tool are free (best effort, counted per IP), then the same per-call price via x402.
2. Prices
| Route | Price (USDC) | Amount (base units, 6 decimals) | Free demo |
|---|---|---|---|
GET /v1/is-business-day | 0.001 | 1000 | /api/free/is-business-day |
GET /v1/add-business-days | 0.001 | 1000 | /api/free/add-business-days |
GET /v1/settlement-date | 0.001 | 1000 | /api/free/settlement-date |
GET /v1/business-days-between | 0.001 | 1000 | /api/free/business-days-between |
GET /v1/adjust | 0.001 | 1000 | /api/free/adjust |
GET /v1/holidays | 0.001 | 1000 | /api/free/holidays |
Holiday rules are public (NYSE, the Federal Reserve, the ECB and GOV.UK publish them free); the price covers deterministic business-day computation and agent-ready JSON, not exclusive data. Not affiliated with NYSE, the Federal Reserve, the ECB or the UK government. Not legal or financial advice; confirm critical dates with the official source. Built and operated with AI automation by Quietwork Labs.
3. The flow
- Request a paid route without payment. You get HTTP 402 with a
PAYMENT-REQUIREDheader (base64 JSON; the same JSON is in the body). It listsscheme: exact,network: eip155:8453(Base mainnet),asset= USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913,amountin USDC base units (6 decimals, so 1000 = $0.001) andpayTo: 0x076e653F4f458201B866B6B46A50F5796C345fb7. - Your client signs a USDC
transferWithAuthorization(EIP-3009) for exactly that amount and retries the same request with aPAYMENT-SIGNATUREheader. - The facilitator (
https://facilitator.payai.network, fallbackhttps://facilitator.xpay.sh) verifies and settles on Base. The facilitator submits the transaction, so the payer needs USDC only, not ETH for gas. - You get HTTP 200 with the data and a
PAYMENT-RESPONSEheader containing the settlement transaction. Unpaid requests, invalid input (HTTP 400) and failed settlements are not charged.
4. TypeScript (x402 v2)
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.BUYER_KEY as `0x${string}`); // a wallet with a little USDC on Base
const pay = wrapFetchWithPayment(fetch, new x402Client().register("eip155:8453", new ExactEvmScheme(account)));
const r = await pay("https://business-days.quietworklabs.workers.dev/v1/settlement-date?trade_date=2026-12-24&t=1&calendars=XNYS%2CFED");
console.log(r.status, await r.json());
See the 402 yourself: curl -i "https://business-days.quietworklabs.workers.dev/v1/settlement-date?trade_date=2026-12-24&t=1&calendars=XNYS%2CFED"
5. MCP clients
POST JSON-RPC to https://business-days.quietworklabs.workers.dev/mcp (Streamable HTTP, stateless). Tools: is_business_day, add_business_days, settlement_date, business_days_between, adjust_date, list_holidays. After the free quota, an unpaid tools/call returns the x402 payment requirements; resend with the signed payload in params._meta["x402/payment"] (the @x402/mcp client does this). The receipt comes back in result._meta["x402/payment-response"].
Machine-readable
- OpenAPI 3.1 (with
x-payment-info) - /.well-known/x402
- MCP server card
- llms.txt
- API docs
Built and operated with AI automation by Quietwork Labs; no staffed on-call team (see About).