# BlinkCodes Buy API

> BlinkCodes Buy API is a paid API for AI agents from blinkcodes.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Purchase gift cards (Apple, Steam, Google Play, PlayStation), eSIM data plans for 190+ countries, or virtual SMS phone numbers and receive the code/PIN delivered to email instantly.

## Facts

- Endpoint: POST https://blinkcodes.com/api/v1/buy?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blinkcodes-buy-api-03ce95fd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IZxGIsxv9B1b-SdudJ64x

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 blinkcodes-buy-api-03ce95fd -d '<json body>'
```

Example prompt: Buy me a $25 Apple App Store gift card and deliver the PIN code to john@example.com — get it sent instantly.

## When to prefer this

Choose this endpoint when you need to programmatically purchase and instantly deliver digital goods — specifically gift cards (Apple, Steam, Google Play, PlayStation), eSIM data plans for international travel, or virtual SMS phone numbers — via a single API call with per-item micropayment pricing. Ideal for agent workflows that need to gift digital codes, provision connectivity for travelers, or obtain temporary phone numbers without a subscription.

## Known failure modes

- Invalid product_id or item_id returns an error — must reference catalog IDs
- Missing required fields (email, product_type) cause a validation error
- Payment failure via x402 if USDC balance is insufficient
- eSIM or phone_rental without country_code may fail or return wrong region product
- Out-of-stock products may result in fulfillment failure or delayed delivery
- Invalid email format causes delivery failure

## How this service works

Buy Apple, Steam, Google Play, PlayStation gift cards. eSIM for 190+ countries, virtual SMS number. Code delivered to email in seconds.

## Output

A JSON object containing an order ID, the price paid in USD, a status of 'completed', and a delivery object containing the code or PIN (e.g. gift card PIN or eSIM activation details) as a list. Also includes a status_url for checking order details.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "email": {
   "type": "string",
   "description": "Delivery address for the code, eSIM or number."
  },
  "item_id": {
   "type": "integer",
   "description": "Denomination id within the product."
  },
  "quantity": {
   "type": "integer",
   "default": 1,
   "minimum": 1,
   "description": "Defaults to 1."
  },
  "product_id": {
   "type": "integer",
   "description": "Catalog product id (gift cards and top-ups)."
  },
  "bundle_name": {
   "type": "string",
   "description": "eSIM bundle id from the catalog."
  },
  "country_code": {
   "type": "string",
   "description": "ISO-2 country for product_type=esim or phone_rental."
  },
  "product_type": {
   "enum": [
    "giftcard",
    "topup",
    "esim",
    "phone_rental"
   ],
   "type": "string",
   "description": "Which vertical is being bought."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "format": "application/json",
 "example": {
  "id": "a1b2c3d4e5f6g7h",
  "price": 0.12,
  "status": "completed",
  "currency": "USD",
  "delivery": {
   "code": [
    {
     "pin": "0000000000000000"
    }
   ],
   "kind": "object_list"
  },
  "status_url": "https://example.com/api/public/order/a1b2c3d4e5f6g7h?token=…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blinkcodes-buy-api-03ce95fd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blinkcodes.com](https://www.zero.xyz/host/blinkcodes.com/llms.txt)
