fbdata
HomeCartOrder QueryArticlesAPI Docs

Open API

API Docs

Built for resellers, distribution systems, and automated integrations. Users fund their USDT wallet first, then place API orders that deduct balance and return delivered card keys.

GET/open/products

List sellable products, specs, stock, and prices

GET/open/balance

Get current USDT wallet balance

POST/open/orders

Create a balance order and return delivered card keys

GET/open/orders/{order_id}

Get an API order and delivered card keys

Authentication

Every open endpoint requires an API Key. The full key is shown only once when generated, so store it securely. If an IP whitelist is enabled, only listed IPs can call the API.

X-API-Key: ok_live_xxxxxxxxxxxxxxxxxxxxxxxx

Bearer authentication is also supported:

Authorization: Bearer ok_live_xxxxxxxxxxxxxxxxxxxxxxxx

Response Format

{
  "code": 0,
  "message": "Success",
  "data": {}
}

code 0 means success. Any non-zero code means failure; read message and params first.

Get Balance

curl -X GET "https://www.fbdata.shop/api/open/balance" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "code": 0,
  "message": "Success",
  "data": {
    "user_id": "4cf4b27b-fe81-40da-88ca-df190925d9d3",
    "balance": "100.000000",
    "currency": "USDT"
  }
}

List Products

curl -X GET "https://www.fbdata.shop/api/open/products?page=1&page_size=20" \
  -H "X-API-Key: YOUR_API_KEY"

The response matches the storefront product list and includes product ID, price, currency, stock, and spec availability. Balance orders currently support USDT products only.

Create Balance Order

client_order_no is your own order number and is strongly recommended. Reusing the same client_order_no returns the same platform order to prevent duplicate charges.

curl -X POST "https://www.fbdata.shop/api/open/orders" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "product_id": "PRODUCT_UUID",
    "spec_id": "SPEC_UUID",
    "quantity": 1,
    "client_order_no": "merchant-order-10001",
    "email": "buyer@example.com"
  }'
{
  "code": 0,
  "message": "Success",
  "data": {
    "order_id": "ORDER_UUID",
    "client_order_no": "merchant-order-10001",
    "status": "DELIVERED",
    "amount": "10.00",
    "currency": "USDT",
    "cards": [
      "AAAA-BBBB-CCCC-DDDD"
    ],
    "balance": "90.000000"
  }
}

Get Order

curl -X GET "https://www.fbdata.shop/api/open/orders/ORDER_UUID" \
  -H "X-API-Key: YOUR_API_KEY"

Delivered orders return cards and grouped card keys. An API Key can only query API orders owned by its user.

Common Error Codes

codeDescription
80001API Key is missing or invalid
80002Current IP is not allowed
80003Insufficient USDT wallet balance
80004client_order_no is already used
30002Insufficient stock
30003Product spec not found
30004Purchase quantity exceeds the limit