Buy a digital gift card code — Foot Locker, Target, AMC, and 1000+ brands. Search the catalog for free, then pay face value + fee in USDC on Base via x402. Codes are delivered instantly: from pre-purchased stock when available, otherwise sourced on demand. The exact price is always shown in the 402 challenge before you sign.
GET /tools/giftcard/api/products?q=...) — free, no payment required.POST /tools/giftcard/api/buy) — dynamic: face value of the card + service fee, in USDC. The exact amount is returned in the 402 payment-required challenge before any signature — never pay blind.curl -s 'https://x402.freeq.one/tools/giftcard/api/products?q=foot%20locker&country=US'
Returns matching products with product_id, pricing range, and fixed-price packages (e.g. foot-locker-usa<&>5 = $5 card):
{
"products": [
{
"product_id": "foot-locker-usa",
"name": "Foot Locker USA",
"country": "US",
"range": false,
"packages": [ { "package_id": "foot-locker-usa<&>5", "value": 5 } ]
}
],
"count": 1
}
POST /tools/giftcard/api/buy
Content-Type: application/json
{
"product_id": "foot-locker-usa<&>5",
"email": "you@example.com"
}
| Field | Type | Description |
|---|---|---|
| product_id | string | Required. From the catalog search (e.g. foot-locker-usa or a fixed package like foot-locker-usa<&>5). |
| value | number | Face value for ranged products (e.g. 25 for a $25 card). Optional for fixed-denomination SKUs. |
| string | Required. Delivery email recorded with the order. |
The server replies 402 Payment Required with the exact USDC amount in the payment-required header. Sign and retry with the payment header — the settlement is verified on-chain and the code is returned:
{
"ok": true,
"order_id": "f3a1...",
"product_id": "foot-locker-usa",
"value": 5,
"codes": ["FL-XXXX-YYYY-ZZZZ"],
"code": "FL-XXXX-XXXX",
"source": "inventory"
}
source is inventory when delivered instantly from pre-purchased stock, or bitrefill when sourced on demand (may take up to ~90s).
Idempotency-Key header. A replayed key returns the original delivered order without double-charging.
# 1. Search (free):
curl -s 'https://x402.freeq.one/tools/giftcard/api/products?q=amazon'
# 2. Buy (triggers x402 challenge):
curl -s -X POST 'https://x402.freeq.one/tools/giftcard/api/buy' \
-H 'Content-Type: application/json' \
-d '{"product_id":"foot-locker-usa<&>5","email":"you@example.com"}'
# 3. MCP (AI agents):
curl -s -X POST 'https://x402.freeq.one/mcp' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"giftcard_buy","arguments":{"product_id":"foot-locker-usa<&>5","email":"you@example.com"}}}'