API Reference

REST API для цифровых продуктов. Подарочные карты, пополнения, игровые ключи, Steam, Roblox, Telegram — одна интеграция.

Base URLhttps://api.fazercards.com/api/v1
АутентификацияX-API-Key

Добавляйте заголовок в каждый запрос. API-ключ идентифицирует ваш аккаунт реселлера и даёт доступ к продуктам и заказам.

Быстрый старт

Получите API-ключ в панели реселлера (Профиль → API ключ). Затем выполните первый запрос:

bash
curl -X GET "https://api.fazercards.com/api/v1/me" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ:

json
{
  "id": "res_xxx",
  "email": "your@email.com",
  "subscription": {
    "plan": "bronze",
    "status": "active",
    "expires_at": "2026-04-10T00:00:00Z"
  }
}

Эндпоинты

Каталог

Игры и категории от провайдеров

Каталог объединяет игры от нескольких провайдеров. GET /games — список игр (для top-up). У каждой игры есть id, name, icon_url, types. ID игр (pubgm, mlbb, steam) используются при запросе продуктов.

Типичный поток: 1) GET /games — список игр, 2) GET /topup/products?game_id=pubgm — продукты для игры, 3) POST /topup/order — создание заказа с product_id и game_fields (ID игрока и т.д.).

GET/games

Returns all games available for top-ups. Each game has id (e.g. pubgm, mlbb), name, icon_url, types.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/games" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "games": [
    {
      "id": "pubgm",
      "name": "PUBG Mobile",
      "icon_url": "https://...",
      "types": ["topup"],
      "is_featured": true
    },
    {
      "id": "steam",
      "name": "Steam",
      "types": ["gift_card", "topup"]
    }
  ]
}

Top-up

Пополнения мобильных игр (PUBG, Free Fire и др.)

Top-up доставляет внутриигровую валюту (UC, diamonds и т.д.) на аккаунт игрока. Нужен player ID и опционально сервер/регион. GET /checkplayerid — проверка ID перед заказом.

GET/checkplayerid

Validate player ID before ordering. Pass game (e.g. pubgm, mlbb), user_id, optional server_id.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/checkplayerid?game=pubgm&user_id=51234567890" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "valid": "valid",
  "name": "PlayerName",
  "openid": "51234567890"
}
GET/topup/products

Get top-up products for a game. Pass game_id from /games (e.g. pubgm, mlbb).

Запрос

curl -X GET "https://api.fazercards.com/api/v1/topup/products?game_id=pubgm" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "products": [
    {
      "id": "pubgm_uc_60",
      "game_id": "pubgm",
      "name": "60 UC",
      "display_name": "60 UC",
      "region": "global",
      "currency": "USD",
      "price": 0.99,
      "min_quantity": 1,
      "max_quantity": 10,
      "fields": [
        {"name": "user_id", "label": "Player ID", "required": true, "type": "text"}
      ]
    }
  ]
}
POST/topup/order

Create top-up order. Include product_id, quantity, and game_fields (player ID, server_id if required).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/topup/order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "pubgm_uc_60",
    "quantity": 1,
    "game_fields": {"user_id": "51234567890"}
  }'

Ответ

{
  "id": "ord_abc123",
  "type": "topup",
  "status": "processing",
  "product_id": "pubgm_uc_60",
  "amount_charged": 0.99,
  "currency": "USD",
  "created_at": "2026-03-10T12:00:00Z"
}

Подарочные карты

Подарочные карты и внутренние коды

Подарочные карты возвращают коды активации (Steam, Amazon и т.д.). GET /giftcards/products с ?category=steam для фильтра. Заказ по product_id и quantity. Коды в ответе или через вебхук.

GET/giftcards/products

Get gift card products. Optional ?category=steam to filter by category.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/giftcards/products?category=steam" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "products": [
    {
      "id": "steam_10_usd",
      "name": "Steam $10",
      "display_name": "Steam Wallet $10",
      "face_value": 10,
      "face_currency": "USD",
      "price": 9.50,
      "stock": 100
    }
  ]
}
POST/giftcards/order

Create gift card order. Codes are delivered in response when completed, or via webhook.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/giftcards/order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "steam_10_usd", "quantity": 2}'

Ответ

{
  "id": "ord_xyz789",
  "type": "gift_card",
  "status": "completed",
  "product_id": "steam_10_usd",
  "amount_charged": 19.00,
  "currency": "USD",
  "payload": {"codes": ["XXXX-YYYY-ZZZZ", "AAAA-BBBB-CCCC"]},
  "created_at": "2026-03-10T12:00:00Z"
}

Игровые ключи

Ключи Steam/Xbox/другие

Игровые ключи — Steam/Xbox/другие. GET /gamekeys — категории, POST /gamekeys/products с game_id — продукты. POST /gamekeys/region-restriction — проверка региона перед заказом.

GET/gamekeys

List game key categories (steamkeys, xboxkeys, otherkeys). Excludes gift cards.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/gamekeys" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "games": [
    {
      "game_id": "doom_eternal_cis_steam_key",
      "name": "DOOM Eternal (CIS) Steam Key",
      "type": "steamkeys"
    }
  ]
}
POST/gamekeys/products

Get products for a game. Use game_id from /gamekeys. Check region-restriction first for region-locked keys.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/gamekeys/products" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game_id": "doom_eternal_cis_steam_key"}'

Ответ

{
  "products": [
    {
      "product_id": "doom_eternal_cis_steam_key_523",
      "game_id": "doom_eternal_cis_steam_key",
      "name": "DOOM Eternal",
      "display_name": "DOOM Eternal (CIS)",
      "price": 5.43,
      "currency": "USD",
      "in_stock": 10
    }
  ]
}
POST/gamekeys/region-restriction

Check if a game key is region-locked. Returns region_type (CIS, ROW, GLOBAL, etc.), available countries, and restrictions.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/gamekeys/region-restriction" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game_id": "doom_eternal_cis_steam_key"}'

Ответ

{
  "region_type": "CIS",
  "has_availability": true,
  "available": [
    {"code": "RU", "name": "Russia"},
    {"code": "KZ", "name": "Kazakhstan"}
  ],
  "regional_only": true
}
POST/gamekeys/order

Create game key order. Keys delivered in payload.codes when completed, or via webhook.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/gamekeys/order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "doom_eternal_cis_steam_key_523", "quantity": 1}'

Ответ

{
  "id": "ord_key123",
  "type": "game_key",
  "status": "completed",
  "product_id": "doom_eternal_cis_steam_key_523",
  "amount_charged": 5.43,
  "currency": "USD",
  "payload": {"codes": ["XXXXX-YYYYY-ZZZZZ-AAAAA-BBBBB"]},
  "created_at": "2026-03-10T12:00:00Z"
}

Steam Top-up / Steam Gifts

Пополнение кошелька Steam. Игры в подарок Steam.

POST/steamtopup/check-login

Validate Steam login before ordering. Pass username (Steam login).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/steamtopup/check-login" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "steam_user"}'

Ответ

{"can_refill": true}
GET/steamtopup/rates

Get Steam wallet exchange rates. Optional ?currency=RUB for a single rate.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/steamtopup/rates" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "rates": [
    {"currency": "USD", "rate": 1.0},
    {"currency": "RUB", "rate": 0.01}
  ]
}
POST/steamtopup/order

Create Steam wallet top-up. Requires username and amount_usd.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/steamtopup/order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "steam_user", "amount_usd": 10}'

Ответ

{
  "id": "ord_steam123",
  "type": "steam_topup",
  "status": "processing",
  "amount_charged": 10,
  "currency": "USD",
  "created_at": "2026-03-10T12:00:00Z"
}
GET/steamgifts/games

List Steam giftable games. Optional ?limit=50.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/steamgifts/games" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "games": [{"appid": 782330, "name": "DOOM Eternal"}],
  "meta": {"total": 5000, "truncated": false}
}
GET/steamgifts/games/{appid}

Get editions/packages for a Steam game. Use appid from /steamgifts/games.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/steamgifts/games/782330" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "game": [
    {"edition": "Standard", "package_id": 12345, "regions_info": [{"region": "RU", "price": 1999}]}
  ]
}
POST/steamgifts/order

Create Steam gift order. Required: appid, package_id, region, invite_url (Steam invite link).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/steamgifts/order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"appid": 782330, "package_id": 12345, "region": "RU", "invite_url": "https://s.team/p/xxx"}'

Ответ

{
  "id": "ord_gift123",
  "type": "steam_gift",
  "status": "processing",
  "amount_charged": 29.99,
  "currency": "USD",
  "created_at": "2026-03-10T12:00:00Z"
}

Telegram

Telegram Premium и Stars

GET/telegram/premium

Get Telegram Premium subscription offers and pricing.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/telegram/premium" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"items": [...], "note": "..."}
GET/telegram/stars

Get Telegram Stars offers (in-app purchases for bots).

Запрос

curl -X GET "https://api.fazercards.com/api/v1/telegram/stars" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"items": [...], "note": "..."}
POST/telegram/premium/gift

Create Telegram Premium gift. Pass username and months.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/telegram/premium/gift" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "telegram_user", "months": 1}'

Ответ

{"order_id": "ord_tg123", "status": "processing"}
POST/telegram/stars/buy

Buy Telegram Stars. Pass username and amount.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/telegram/stars/buy" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "telegram_user", "amount": 100}'

Ответ

{"order_id": "ord_stars123", "status": "processing"}

Roblox Packs

Пакеты Roblox (доставка Robux)

GET/roblox/packages/products

Get Roblox pack products (Robux). Includes regular and backup delivery options.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/roblox/packages/products" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "products": [
    {"id": "roblox_pack_80", "name": "80 Robux", "price": 0.99, "is_backup": false}
  ]
}
POST/roblox/packages/buy

Create Roblox pack order. Required: product_id, login, password. For backup: is_backup=true and backup_codes (3 codes).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/roblox/packages/buy" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "roblox_pack_80", "login": "roblox_user", "password": "***"}'

Ответ

{
  "id": "ord_roblox123",
  "type": "roblox_packs",
  "status": "processing",
  "product_id": "roblox_pack_80",
  "amount_charged": 0.99,
  "currency": "USD",
  "payload": {"chat_id": "chat_xxx"},
  "created_at": "2026-03-10T12:00:00Z"
}
GET/roblox/packages/chat/{chatId}

Get chat messages for a Roblox order. chatId is in order payload. Used when operator needs info from you.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/roblox/packages/chat/chat_xxx" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "messages": [
    {"id": "msg_1", "content": "Please provide 2FA code", "sender": "operator", "created_at": "..."}
  ]
}
POST/roblox/packages/chat/{chatId}/send

Send a message in order chat. Use to reply to operator (e.g. 2FA code).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/roblox/packages/chat/chat_xxx/send" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "123456"}'

Ответ

{"id": "msg_2", "content": "123456", "sender": "user", "created_at": "..."}

Заказы

Статус и детали заказов

docs.api.orderStatusExplain

GET/orders/{orderId}

Get order details. When status is completed, codes are in payload.codes (or delivered via webhook).

Запрос

curl -X GET "https://api.fazercards.com/api/v1/orders/ord_abc123" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "id": "ord_abc123",
  "type": "gift_card",
  "status": "completed",
  "product_id": "steam_10_usd",
  "amount_charged": 9.50,
  "currency": "USD",
  "payload": {"codes": ["XXXX-YYYY-ZZZZ"]},
  "created_at": "2026-03-10T12:00:00Z",
  "updated_at": "2026-03-10T12:00:15Z"
}
GET/orders

List orders. Optional query params: status, limit, offset.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/orders?limit=20" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "orders": [
    {"id": "ord_abc", "type": "gift_card", "status": "completed", "amount_charged": 9.50, ...}
  ]
}

Аккаунт

Баланс, транзакции, настройки вебхука

Заказы списываются с баланса. Пополнение: GET /balance/topup/methods и POST /balance/topup. Принимаем Binance Pay, USDT (TRC20, BEP20, TON, Aptos), карты.

GET/me

Get current API user and subscription info.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/me" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "id": "res_xxx",
  "email": "your@email.com",
  "subscription": {"plan": "bronze", "status": "active", "expires_at": "..."}
}
GET/balance

Get current balance. Orders are charged from balance.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/balance" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"currency": "USD", "available": 150.50}
GET/balance/topup/methods

Get available payment methods for balance top-up: Binance Pay, USDT (TRC20, BEP20, TON, Aptos), cards.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/balance/topup/methods" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "methods": [
    {"id": "binance_pay", "name": "Binance Pay"},
    {"id": "usdt_trc20", "name": "USDT (TRC20)"},
    {"id": "usdt_bep20", "name": "USDT (BEP20)"},
    {"id": "usdt_ton", "name": "USDT (TON)"},
    {"id": "usdt_aptos", "name": "USDT (Aptos)"}
  ]
}
POST/balance/topup

Create balance top-up request. Returns payment URL or instructions (Binance Pay, USDT, etc.).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/balance/topup" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method_id": "usdt_trc20", "amount": 50}'

Ответ

{
  "payment_url": "https://...",
  "amount": 50,
  "currency": "USDT",
  "address": "Txxx...",
  "expires_at": "..."
}
GET/transactions

List balance transactions (add_balance, charge_balance, refund)

GET/transaction/{transactionId}

Get transaction details

POST/balance/topup/verify-binance-pay

Verify Binance Pay payment after user completes it

Подписка

Управление подпиской

GET/subscription

Get current subscription: plan (bronze/silver/gold), status, expires_at, auto_renew.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/subscription" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{
  "subscription": {
    "plan": "bronze",
    "plan_months": 1,
    "expires_at": "2026-04-10T00:00:00Z",
    "auto_renew": false,
    "status": "active",
    "charged": 9.99
  }
}
POST/subscription/renew

Renew subscription. Charges from balance. Optional: plan, months, auto_renew.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/subscription/renew" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan": "bronze", "months": 1}'

Ответ

{"subscription": {"plan": "bronze", "status": "active", "expires_at": "..."}}
POST/subscription/upgrade

Upgrade plan or extend term. Required: plan. Optional: months, auto_renew.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/subscription/upgrade" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan": "gold", "months": 3}'

Ответ

{"subscription": {"plan": "gold", "status": "active", ...}}
POST/subscription/auto-renew

Enable or disable auto-renew. Required: enabled (boolean).

Запрос

curl -X POST "https://api.fazercards.com/api/v1/subscription/auto-renew" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'

Ответ

{"subscription": {"auto_renew": true, ...}}

Вебхуки

Настройка вебхуков

GET/me/webhook

Get current webhook config (URL). Secret is never returned after initial setup.

Запрос

curl -X GET "https://api.fazercards.com/api/v1/me/webhook" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"webhook_url": "https://your-server.com/webhook"}
POST/me/webhook

Set webhook URL. Returns secret once — store it for signature verification.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/me/webhook" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"webhook_url": "https://your-server.com/webhook"}'

Ответ

{
  "webhook_url": "https://your-server.com/webhook",
  "secret": "whsec_xxx..."
}
PUT/me/webhook/settings

Update webhook URL without changing the secret.

Запрос

curl -X PUT "https://api.fazercards.com/api/v1/me/webhook/settings" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"webhook_url": "https://new-url.com/webhook"}'

Ответ

{"webhook_url": "https://new-url.com/webhook"}
POST/me/webhook/regenerate

Regenerate webhook secret. Returns new secret once. Use after leak or rotation.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/me/webhook/regenerate" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"secret": "whsec_new_xxx..."}
POST/me/webhook/test

Send a test webhook event to your URL. Use to verify your endpoint.

Запрос

curl -X POST "https://api.fazercards.com/api/v1/me/webhook/test" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"sent": true}
DELETE/me/webhook

Remove webhook. No more notifications will be sent.

Запрос

curl -X DELETE "https://api.fazercards.com/api/v1/me/webhook" \
  -H "X-API-Key: YOUR_API_KEY"

Ответ

{"webhook_url": null}
Руководство по вебхукам

Начать

Начните интеграцию с бесплатного пробного периода.