Place orders programmatically, receive real-time delivery updates, and manage transactions securely with wallet-based billing. Built for resellers and automation.
Everything you need to place your first automated data bundle order.
POST /order with your key, recipient phone, network, and bundle size. The system handles delivery, retries, and status updates automatically.Pass your API key as a header on every request. Keys are issued to approved wholesale accounts only.
X-API-Key: fdx_your_api_key_here
{ "api_key": "fdx_your_api_key_here", ... }
https://flexdata.shop/wp-json/flexdata/v1
All endpoints require a valid active key. Wholesale pricing applies to all orders automatically.
Place a data bundle order. Wallet is checked and debited immediately. Order enters the auto-retry delivery queue.
| Field | Type | Description |
|---|---|---|
phonerequired | string | Recipient number, e.g. 0244123456 |
product_idrequired | string | mtn · telecel · at_bigtime · at_ishare |
package_sizerequired | integer | Bundle in MB — e.g. 1000 for 1 GB. See GET /products. |
POST https://flexdata.shop/wp-json/flexdata/v1/order
X-API-Key: fdx_your_key_here
Content-Type: application/json
{
"phone": "0244123456",
"product_id": "mtn",
"package_size": 1000
}
{
"success": true,
"order_id": 1042,
"status": "processing",
"reference": "rkref_abc123",
"phone": "0244123456",
"bundle": "1 GB",
"network": "MTN",
"amount_ghs": 4.45,
"message": "Bundle delivered successfully."
}
Return the current wallet balance for the authenticated user.
GET https://flexdata.shop/wp-json/flexdata/v1/balance X-API-Key: fdx_your_key_here
{ "success": true, "balance_ghs": 250.00, "currency": "GHS" }
Get real-time delivery status for an order. Poll this endpoint while status is retrying.
GET https://flexdata.shop/wp-json/flexdata/v1/status?order_id=1042 X-API-Key: fdx_your_key_here
| Status | Meaning |
|---|---|
pending | Order created — first delivery attempt starting |
retrying | Delivery in progress — system is auto-retrying |
processing | Bundle delivered successfully |
on-hold | Held for manual admin processing |
failed | Manually closed — contact support |
List all available bundles with wholesale pricing in GHS.
GET https://flexdata.shop/wp-json/flexdata/v1/products X-API-Key: fdx_your_key_here
{
"success": true,
"products": [
{
"product_id": "mtn",
"network": "MTN",
"bundles": [
{ "package_size_mb": 1000, "label": "1 GB", "price_ghs": 4.45 },
{ "package_size_mb": 2000, "label": "2 GB", "price_ghs": 8.90 }
]
}
],
"note": "All prices reflect wholesale tier. Prices are in GHS."
}
FlexData sends a POST request to your configured URL on every order status change. Failed deliveries are retried up to 3 times (30s, then 120s).
2xx to acknowledge. Configure your webhook URL in the Your Access section.{
"event": "order.status_changed",
"order_id": 1042,
"status": "processing",
"old_status": "retrying",
"phone": "0244123456",
"bundle": "1 GB",
"network": "mtn",
"amount": 4.45,
"reference": "rkref_abc123",
"timestamp": "2025-01-15T12:30:00+00:00"
}
All errors return a consistent JSON structure with a human-readable message.
{ "success": false, "error": "Human-readable error message" }
| HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_key / invalid_key | API key is missing or invalid |
| 402 | insufficient_balance | Wallet balance is too low for this order |
| 403 | key_pending / key_revoked / role_denied | Key not yet approved, revoked, or account is not wholesale |
| 404 | bundle_unavailable / order_not_found | Bundle or order does not exist |
| 422 | invalid_phone / invalid_product | Input validation failed |
| 429 | rate_limit / duplicate_order | Too many requests or duplicate order within 60s |
| 500 | wallet_unavailable / wc_unavailable | Internal server error |
Manage your API key and webhook endpoint.
Your credentials for the FlexData Developer API
Receive instant notifications about: