Gift Card Buy

dynamic

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.

FREE: catalog search PAID: purchase (face value + fee)

Pricing

Step 1 — Search the catalog (free)

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
}

Step 2 — Buy (x402-paid)

POST /tools/giftcard/api/buy
Content-Type: application/json

{
  "product_id": "foot-locker-usa<&>5",
  "email": "you@example.com"
}

Parameters

FieldTypeDescription
product_idstringRequired. From the catalog search (e.g. foot-locker-usa or a fixed package like foot-locker-usa<&>5).
valuenumberFace value for ranged products (e.g. 25 for a $25 card). Optional for fixed-denomination SKUs.
emailstringRequired. 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:

Response

{
  "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).

Idempotent retries: send an Idempotency-Key header. A replayed key returns the original delivered order without double-charging.

Try it

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