Before you begin, make sure you have:
- An IA-Café account (Sign up here if you don't have one)
- A funded wallet (for making purchases)
- Basic knowledge of HTTP/REST APIs
Get up and running with the IA-Café API in under 5 minutes. This guide will walk you through everything you need to make your first API call.
Before you begin, make sure you have:
Go to your Profile page and navigate to the "Developer" section. Click "Generate API Key" to create a new key.
ak_live_abc123xyz789...
Your API uses the same wallet as your dashboard. Fund your wallet through the dashboard before making purchase requests. All transactions are deducted from your wallet balance.
Make a simple test request to verify your API key is working:
curl -X GET "https://iacafe.com.ng/devapi/v1/whoami" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"user_id": 123,
"username": "your_username",
"email": "your@email.com",
"wallet_balance": "5000.00"
}
}
Let's buy some airtime! Here's a complete example:
curl -X POST "https://iacafe.com.ng/devapi/v1/airtime" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "unique_id_12345",
"phone": "08012345678",
"service_id": "mtn",
"amount": 100
}'
{
"code": "success",
"message": "ORDER COMPLETED",
"data": {
"product_name": "Airtime",
"service_name": "MTN",
"status": "completed-api",
"order_id": 355960,
"phone": "08012345678",
"amount": 100,
"discount": "2.20",
"amount_charged": "97.80",
"request_id": "unique_id_12345"
}
}
For the best experience, set up webhooks to receive real-time notifications when transactions complete. This is especially important for electricity tokens.
The request_id is a unique identifier YOU create for each transaction.
It serves several important purposes:
If you accidentally send the same request twice, the API will reject the duplicate and return the original transaction.
Use your own IDs to track transactions in your system. Query order status anytime using your request_id.
When you receive a webhook, the request_id helps you match it to the original transaction in your database.
yourapp_airtime_1704067200_abc123To ensure fair usage and system stability, the API has rate limits:
| Limit | Value | Description |
|---|---|---|
| Requests per minute | 60 | Maximum API calls per minute per API key |
Rate limit information is included in response headers:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1704067260
Check your wallet balance, view recent transactions, and get spending statistics. This endpoint is useful for monitoring your account before making purchases.
curl -X GET "https://iacafe.com.ng/devapi/v1/wallet" \ -H "Authorization: Bearer YOUR_API_KEY"
| Parameter | Type | Description |
|---|---|---|
include_transactions |
boolean | Set to true to include last 5 transactions |
include_stats |
boolean | Set to true to include spending statistics |
{
"success": true,
"message": "Wallet balance retrieved",
"data": {
"balance": 5000.00,
"balance_formatted": "5000.00",
"currency": "NGN",
"currency_symbol": "₦",
"user": {
"name": "John Doe",
"email": "john@example.com",
"member_since": "2024-01-15T10:30:00Z"
},
"recent_transactions": [
{
"id": 12345,
"type": "airtime",
"status": "completed-api",
"amount": "100.00",
"amount_charged": "97.80",
"balance_before": "5097.80",
"balance_after": "5000.00",
"created_at": "2024-01-20T14:30:00Z"
}
],
"stats": {
"total_spent": "15000.00",
"total_orders": 45,
"spent_today": "500.00",
"pending_orders": 2
}
}
}
Get detailed transaction history with pagination and filters:
curl -X GET "https://iacafe.com.ng/devapi/v1/wallet/transactions?limit=20&page=1" \ -H "Authorization: Bearer YOUR_API_KEY"
Get a comprehensive summary with categorized spending:
curl -X GET "https://iacafe.com.ng/devapi/v1/wallet/summary" \ -H "Authorization: Bearer YOUR_API_KEY"