đĄ SPFastIT API Documentation
Welcome to the developer hub. Use this API to integrate data vending directly into your own applications.
đ Authentication:
All requests must use the POST method.
Pass your
Get your API Key here
All requests must use the POST method.
Pass your
api_key inside the JSON body of every request.Get your API Key here
đ° 1. Check Wallet Balance
Retrieve your current wallet balance.
POST https://spfastit.com/wp-json/custom-api/v1/balance
Request Body:
{
"api_key": "YOUR_API_KEY"
}
Success Response:
{
"status": "success",
"message": "Balance retrieved.",
"balance": 948.21,
"currency": "âĩ",
"formatted": "âĩ948.21"
}
đĻ 2. Place Order (Buy Data)
Purchase a data bundle for a specific number.
POST https://spfastit.com/wp-json/custom-api/v1/place-order
Request Body:
{
"api_key": "YOUR_API_KEY",
"phone": "054xxxxxxx",
"size_mb": 1024,
"network": "mtn",
"reference": "YOUR_UNIQUE_ID_123",
"webhook_url": "https://your-site.com/webhook"
}
* Note: size_mb must be in MB (e.g., 1024 for 1GB). network can be 'mtn' or 'telecel'.
Success Response:
{
"status": "success",
"message": "Order placed.",
"order_id": 646856,
"wallet_balance_before": 948.21,
"wallet_balance_after": 943.71,
"order_status": "initiated",
"size_gb": "1.00 GB"
}
đ Supported Networks & Sizes (MB)
- MTN:
1024, 2048, 3072, 4096, 5120, 6144, 8192, 10240, 15360, 20480, 25600, 30720, 40960, 51200 - Telecel:
10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000
đŗ 3. Top-up Wallet (Mobile Money)
Initiate a payment prompt. The wallet is credited automatically once the user pays.
POST https://spfastit.com/wp-json/custom-api/v1/topup-init
Request Body:
{
"api_key": "YOUR_API_KEY",
"phone": "055xxxxxxx",
"amount": 10,
"network": "mtn"
}
Response:
{
"status": "success",
"message": "Prompt sent. Wallet will be credited automatically upon payment.",
"reference": "spfastitcom_123_ref...",
"amount": "10.00"
}
âšī¸ Note: No verification step is required. Once the user pays on their phone, our system automatically detects the payment and credits the wallet within seconds.
đ 4. Check Order Status
Manually check the status of any order using the Order ID or your Reference.
POST https://spfastit.com/wp-json/custom-api/v1/status
Request Body (Option A: By Order ID):
{
"api_key": "YOUR_API_KEY",
"order_id": 646856
}
Request Body (Option B: By Reference):
{
"api_key": "YOUR_API_KEY",
"reference": "YOUR_UNIQUE_ID_123"
}
Success Response:
{
"status": "success",
"order_id": 646856,
"order_status": "completed",
"status_label": "Completed",
"reference": "YOUR_UNIQUE_ID_123",
"amount": "4.50"
}
đˇī¸ 5. Check My Prices
Retrieve the current price list for your account (including any special reseller rates).
POST https://spfastit.com/wp-json/custom-api/v1/prices
Request Body:
{
"api_key": "YOUR_API_KEY"
}
Success Response:
{
"status": "success",
"prices": {
"mtn": [
{ "size_mb": 1024, "size_gb": 1, "price": 4.50 },
{ "size_mb": 2048, "size_gb": 2, "price": 9.00 }
],
"telecel": [
{ "size_mb": 10000, "size_gb": 10, "price": 39.00 }
]
}
}
đ Webhooks
If you provide a webhook_url in the Place Order request, we will POST updates to you when the order status changes.
Payload Example:
{
"reference": "YOUR_UNIQUE_ID_123",
"status": "completed",
"status_label": "Completed",
"order_id": 646856,
"phone": "054xxxxxxx",
"message": "Order updated to status: Completed"
}
