Base URL: https://public-api.foxreload.com
Authentication
हर request `X-API-Key: YOUR_API_KEY` पास करती है। Keys `Dashboard → API` में issue होती हैं और एक बार दिखती हैं। Key के लिए IP allowlist सेट कर सकते हैं। HTTPS ज़रूरी।
curl https://public-api.foxreload.com/api/products/?category_id_or_slug=steam \
-H "X-API-Key: YOUR_API_KEY" \
-H "Accept: application/json"Core endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/categories/ | List categories (tree via parent_id_or_slug). |
| GET | /api/products/ | List products in a category. The product id is the itemId for orders. |
| GET | /api/products/search | Search products by query. |
| POST | /api/orders/ | Create an order by product_id (itemId). 1–10 items. |
| GET | /api/orders/{order_id} | Order status; codes in items[].externalData when completed. |
| GET | /api/orders/ | Paginated order history with status filter. |
| POST | /api/orders/{order_id}/pay | Create a payment for an order. |
| POST | /api/topups/crypto/ | Top up balance with crypto. |
Order बनाना
Order `product_id` (`itemId` field) से बनता है — public API में offers नहीं दिखते। एक order में 1–10 items। `totalPrice` optional है: न देने पर current product price लिया जाता है। अगर product को extra data चाहिए (जैसे player UID), उसे `note` में भेजें।
POST https://public-api.foxreload.com/api/orders/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
{
"items": [
{ "itemId": "product_01krgfgww8eth9xvvysd6y7r4j", "quantity": 5 }
]
}Codes लेना
Public API में webhooks नहीं हैं — `GET /api/orders/{order_id}` को poll करें। जब status `completed` होता है, हर `items[].externalData` में product codes आ जाते हैं।
GET https://public-api.foxreload.com/api/orders/{order_id}
X-API-Key: YOUR_API_KEY
{
"id": "order-uuid",
"status": "completed",
"items": [
{
"product": { "id": "product_01krg...", "name": "Steam 500 RUB" },
"quantity": 5,
"externalData": ["XXXX-YYYY-ZZZZ", "..."],
"error": null
}
]
}Reliability
Network errors और `HTTP 429` पर exponential backoff उपयोग करें। दोबारा order बनाने से पहले status check करें ताकि double-buy न हो।
पूरी OpenAPI 3.1 specification
https://public-api.foxreload.com/openapi.json · OpenAPI 3.1 / JSON. Compatible with swagger-ui, redoc, insomnia, postman.
