What Is an Instant Delivery API?
An instant delivery API is a programmatic interface that allows your store or bot to request a digital code (gift card, game top-up voucher) and receive it back automatically within seconds โ without any human intervention.
For digital goods resellers, this is the technology that separates scalable businesses from manual operations. Instead of a staff member looking up codes and copy-pasting them to customers, the entire process happens automatically in 2โ5 seconds.
How FoxReload's API Works
FoxReload provides a REST API for B2B resellers. The API handles:
- Product catalog and pricing
- Order placement and code delivery
- Order status and history
- Account balance
Authentication
All requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
API keys are generated in your FoxReload dashboard after registration.
Base URL
https://api.foxreload.com/v1/
Core API Endpoints
1. Get Catalog
Retrieve all available products with current pricing and stock status.
GET /catalog
Response:
{
"products": [
{
"sku": "GPLAY_IN_100",
"name": "Google Play India โน100",
"category": "gift-cards",
"price_usdt": 1.08,
"in_stock": true
},
{
"sku": "PUBG_UC_325",
"name": "PUBG Mobile 325 UC",
"category": "game-topups",
"price_usdt": 3.45,
"in_stock": true
}
]
}
Call this periodically to update your local product cache and display accurate stock status to customers.
2. Place Order
POST /order
Body: {
"sku": "GPLAY_IN_500",
"quantity": 1,
"reference": "your-order-id-123"
}
Response (success):
{
"order_id": "fr_ord_789",
"status": "delivered",
"code": "XXXX-XXXX-XXXX-XXXX",
"delivered_at": "2026-05-27T10:23:45Z"
}
The reference field is your internal order ID โ include it to link FoxReload orders to your own order management system.
3. Check Order Status
GET /order/{order_id}
Response:
{
"order_id": "fr_ord_789",
"sku": "GPLAY_IN_500",
"status": "delivered",
"code": "XXXX-XXXX-XXXX-XXXX",
"created_at": "2026-05-27T10:23:44Z",
"delivered_at": "2026-05-27T10:23:45Z"
}
Use this for status checks if an order doesn't return immediately (rare) or for order history.
4. Account Balance
GET /account/balance
Response:
{
"balance_usdt": 145.23,
"currency": "USDT"
}
Use in your monitoring to alert when balance drops below a threshold.
Integration Patterns
Pattern 1: Telegram Bot (Python)
import requests
from telegram import Update
from telegram.ext import ContextTypes
FOXRELOAD_API_KEY = "your_api_key"
FOXRELOAD_BASE = "https://api.foxreload.com/v1"
def order_code(sku: str, reference: str) -> dict:
response = requests.post(
f"{FOXRELOAD_BASE}/order",
json={"sku": sku, "quantity": 1, "reference": reference},
headers={"Authorization": f"Bearer {FOXRELOAD_API_KEY}"}
)
return response.json()
async def handle_payment_confirmed(update: Update, context: ContextTypes.DEFAULT_TYPE):
# Called when payment is confirmed
sku = context.user_data["pending_sku"]
order_ref = f"tg_{update.effective_user.id}_{int(time.time())}"
result = order_code(sku, order_ref)
if result["status"] == "delivered":
await update.message.reply_text(
f"โ
Your code: `{result['code']}`\n"
f"Thank you for your purchase!"
)
else:
await update.message.reply_text(
"โ ๏ธ Delivery issue. Support has been notified."
)
Pattern 2: Web Store Webhook (Node.js)
// Called by payment processor webhook on payment success
app.post('/webhook/payment', async (req, res) => {
const { orderId, sku } = await verifyPaymentWebhook(req);
const foxResponse = await fetch('https://api.foxreload.com/v1/order', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.FOXRELOAD_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ sku, quantity: 1, reference: orderId })
});
const { code, status } = await foxResponse.json();
if (status === 'delivered') {
await deliverCodeToCustomer(orderId, code);
}
res.json({ received: true });
});
Error Handling
Build robust error handling for production reliability:
| Error Code | Meaning | Action |
|---|---|---|
PRODUCT_OUT_OF_STOCK |
SKU unavailable | Offer alternative denomination or notify customer |
INSUFFICIENT_BALANCE |
USDT balance too low | Auto-alert to top up; pause orders for this SKU |
INVALID_SKU |
Product ID doesn't exist | Check catalog for correct SKU identifier |
RATE_LIMIT_EXCEEDED |
Too many requests | Implement exponential backoff retry |
ORDER_FAILED |
General delivery failure | Retry once; escalate to support if retry fails |
Always log raw API responses for debugging. Include your internal order reference in all API calls for traceability.
Reliability Best Practices
Idempotent Orders
Pass a unique reference ID per order. If a request times out and you retry, FoxReload will return the same code for the same reference rather than charging you twice.
Balance Monitoring
Set up an alert when USDT balance drops below a threshold (e.g., $50 remaining). Automated orders will fail if balance hits zero โ don't let this happen during peak hours.
Stock Monitoring
Periodically (every 15โ30 minutes) call the catalog endpoint and update your local stock status. Don't display products as available if FoxReload's API shows them out of stock.
Timeout Handling
API calls normally return in under 5 seconds. Set a request timeout of 15 seconds. If a request times out:
- Wait 10 seconds
- Check order status by reference ID
- If order delivered, use the code; if not, retry
Testing Your Integration
Before going live:
- Use FoxReload's sandbox environment for initial testing
- Place real orders with small denominations to verify end-to-end
- Test error scenarios: insufficient balance, out-of-stock SKU
- Verify delivery speed from your server location
- Test your error handling paths
See also:
- Why Resellers Need One API for Gift Cards and Game Top-Ups
- How FoxReload Helps Resellers Sell Digital Goods Faster
- Why Digital Goods Resellers Should Avoid Manual Code Delivery
Integrate FoxReload's instant delivery API and start fulfilling digital goods orders in seconds. Register for API access.

