API Documentation
The Store API allows resellers to programmatically interact with our store. You can integrate our product catalog directly into your own website, Discord bot, Telegram bot, WooCommerce store, or custom application.
Our API is built on REST principles, accepts JSON payloads, and returns JSON responses.
Base URL
Authentication
All API requests require authentication using an API Key. You can generate and manage your API Key from your profile inside our Telegram Bot.
Pass your API Key in the HTTP Headers using X-API-Key.
curl -H "X-API-Key: fk_live_YOUR_API_KEY_HERE" https://tbot.foxykeys.com/api/v1/me
Rate Limits & Errors
To ensure platform stability, the API is strictly rate-limited to 3 requests per second per API Key. If you exceed this limit, you will receive a 429 Too Many Requests error.
Standard Error Format
{
"success": false,
"message": "Error description here",
"data": []
}
HTTP Status Codes
| 200 | OK: Request succeeded. |
| 400 | Bad Request: Missing parameters. |
| 401 | Unauthorized: Invalid X-API-Key. |
| 402 | Payment Required: Insufficient balance. |
| 404 | Not Found: Endpoint not found. |
| 409 | Conflict: Out of stock. |
| 429 | Too Many Requests: Rate limit hit. |
API Reference
Profile & Wallet
Retrieve your current wallet balance and account information.
Response Body
{
"success": true,
"message": "User profile fetched successfully",
"data": {
"telegram_id": 123456789,
"username": "reseller_john",
"wallet_balance_usdt": 150.50,
"currency": "USDT",
"merchant_id": 1 }
}
List Categories
Retrieve all active product categories.
Response Body
{
"success": true,
"message": "Categories fetched successfully",
"data": [
{
"id": 1,
"name": "Software Licenses"
},
{
"id": 2,
"name": "Gift Cards"
}
]
}
List Products
Retrieve the active product catalog, pricing, and live stock availability.
Query Parameters
| Name | Type | Description |
|---|---|---|
| category_id | Integer | Optional. Filter products by a specific category ID. |
Response Body
{
"success": true,
"message": "Products fetched successfully",
"data": [
{
"id": 5,
"name": "Gemini Pro 3.1 - 18 Months",
"price_usdt": 0.900000,
"description": "Product details...",
"category_id": 1,
"stock": 42
}
]
}
Create Order
Instantly purchase a product. The total cost will be deducted from your wallet balance. Digital keys or API credits are provisioned immediately in the response.
JSON Body Parameters
| Name | Type | Description |
|---|---|---|
| product_id Req | Integer | The ID of the product to purchase. |
| quantity | Integer | Number of items to buy. Defaults to 1. |
| variant_index | Integer | Req for Credit/API products. The index of the package in the `api_packages` array. |
| customer_credentials | Object | Req for Credit/API products. The JSON object containing setup data (e.g., `{"username":"x","mac":"y"}`). |
Example: Keys/Files
curl -X POST https://tbot.foxykeys.com/api/v1/order \
-H "X-API-Key: fk_live_XYZ" \
-H "Content-Type: application/json" \
-d '{"product_id": 5, "quantity": 1}'
Example: External API / Credits
curl -X POST https://tbot.foxykeys.com/api/v1/order \
-H "X-API-Key: fk_live_XYZ" \
-H "Content-Type: application/json" \
-d '{
"product_id": 999,
"variant_index": 0,
"customer_credentials": {"username": "john"}
}'
Success Response
{
"success": true,
"message": "Order placed successfully",
"data": {
"order_id": 9845,
"order_code": "A1B2C3D4",
"product_name": "Gemini Pro 3.1 - 18 Months",
"product_type": "keys",
"quantity": 1,
"total_usdt": 0.900000,
"wallet_balance_remaining": 135.50,
"keys": [
"AAAA-BBBB-CCCC-DDDD"
]
}
}
Note: If product_type is file, the response contains file_name instead of keys. If it is credit or service, it contains status and possibly api_response directly from the remote server.
List Orders
Retrieve a list of your most recent orders.
Response Body
{
"success": true,
"message": "Recent orders fetched successfully",
"data": [
{
"order_id": 9845,
"order_code": "A1B2C3D4",
"product_id": 5,
"total_usdt": 0.900000,
"status": "delivered",
"created_at": "2023-10-25 14:30:00"
}
]
}
Order Details
Retrieve the details of a specific order, including the digital keys or API payloads delivered.
Response Body
{
"success": true,
"message": "Order fetched successfully",
"data": {
"order_id": 9845,
"order_code": "A1B2C3D4",
"product_id": 5,
"total_usdt": 0.900000,
"status": "delivered",
"created_at": "2023-10-25 14:30:00",
"keys": [
"AAAA-BBBB-CCCC-DDDD"
]
}
}