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.
/open/productsList sellable products, specs, stock, and prices
/open/balanceGet current USDT wallet balance
/open/ordersCreate a balance order and return delivered card keys
/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_xxxxxxxxxxxxxxxxxxxxxxxxBearer authentication is also supported:
Authorization: Bearer ok_live_xxxxxxxxxxxxxxxxxxxxxxxxResponse 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
| code | Description |
|---|---|
| 80001 | API Key is missing or invalid |
| 80002 | Current IP is not allowed |
| 80003 | Insufficient USDT wallet balance |
| 80004 | client_order_no is already used |
| 30002 | Insufficient stock |
| 30003 | Product spec not found |
| 30004 | Purchase quantity exceeds the limit |