# x402-giftcard-api

> x402-giftcard-api is a paid API for AI agents from x402.freeq.one, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Purchase a digital gift card code for a specified product and face value, paid via x402 micropayment protocol.

## Facts

- Endpoint: POST https://x402.freeq.one/tools/giftcard/api/buy
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-giftcard-api-bb56191e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kvTgB-Of340F7k264eUQw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-giftcard-api-bb56191e -d '<json body>'
```

Example prompt: Buy me a $25 Foot Locker USA gift card — the product ID is foot-locker-usa — and send the code to myemail@example.com.

## When to prefer this

Use this endpoint when you need to programmatically purchase a digital gift card code on demand, especially in agent workflows that reward users, automate gifting, or handle customer incentives — particularly when paying via USDC over the x402 protocol at very low overhead ($0.01 per call plus the gift card face value).

## Known failure modes

- Invalid or unsupported product_id returns an error indicating the catalog item was not found
- Face value not supported for the selected product results in a rejection
- Payment challenge not signed or x402 payment not completed results in a 402 Payment Required response
- Invalid email format may cause a validation error
- Insufficient USDC balance or failed payment results in purchase not being fulfilled

## How this service works

Buy a gift card code at the listed price. Price is returned in the payment challenge before you sign.

## Output

Returns a JSON object with a result field containing the gift card code and purchase details (exact fields depend on the product catalog); the code can be used directly to redeem at the retailer.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "email": {
   "type": "string",
   "description": "Delivery email (optional, for some retailers)"
  },
  "value": {
   "type": "number",
   "description": "Face value in USD for ranged products (fixed-price products embed the value in the ID)"
  },
  "product_id": {
   "type": "string",
   "description": "Gift card product ID or fixed-price package ID (e.g. amazon.com-usa, foot-locker-usa<&>25)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-giftcard-api-bb56191e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.freeq.one](https://www.zero.xyz/host/x402.freeq.one/llms.txt)
