Quickstart
Base URL: https://recallguard-api.vercel.app
1. Read health
curl -s https://recallguard-api.vercel.app/api/v1/healthHealth, /, and /openapi.json do not require payment.
2. Call feed or match without a payment
Feed:
curl -s -D - https://recallguard-api.vercel.app/api/v1/feed?limit=1Match:
curl -s -D - -X POST https://recallguard-api.vercel.app/api/v1/match \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"name\":\"Raw Milk Medium Cheddar\",\"brand\":\"Sierra Nevada Graziers\",\"upc\":\"687652165013\"}]}"Both return HTTP 402. The body is x402Version 1, an error string, and one accepts entry. There is no trial token and no bearer-token bypass on this host.
Feed maxAmountRequired is "50000" ($0.05). Match is "100000" ($0.10). asset is official Base USDC. maxTimeoutSeconds is 60. network is base.
3. Pay
Send the same request with an X-PAYMENT header. The value is base64 JSON:
x402Version: 1scheme:exactnetwork:basepayload.signature: the EIP-3009 signaturepayload.authorization:from,to,value,validAfter,validBefore,nonce
to is the challenge payTo. value is the challenge maxAmountRequired. validAfter can be "0". validBefore has to be inside the 60-second challenge window. A window of about 30 seconds is inside that limit.
The server asks https://facilitator.payai.network to verify the header, runs the handler, then asks the facilitator to settle. The facilitator pays the gas. A handler error is returned without settlement.
4. Read the receipt
A settled response is HTTP 200. The receipt is the X-PAYMENT-RESPONSE header, base64 JSON with success, transaction, network, and payer.
The one confirmed receipt is the match self-test:
{
"success": true,
"transaction": "0xf3919e8c55a4e7163cb10e88baa1d4b183d861ff379a54d0d001d932a6325999",
"network": "base",
"payer": "0x638FdbB31446B1D4a73a92A2f984C7a1D5FDA339"
}The on-chain transfer is 100,000 atomic units ($0.10) of Base USDC to 0x90E23A7b6F6494A879d05DDC4278D0e55Dec1e01. Confirm the hash on BaseScan. A 62-character copy of that hash does not resolve.