Data Bundles
Purchase mobile data bundles for all major Nigerian network providers. Retrieve available providers, view data plans, and purchase data subscriptions seamlessly.
Get Data Providers
Retrieve a list of available internet data providers.
Endpoint
GET https://api.budpay.com/api/v2/internetSample Request
curl https://api.budpay.com/api/v2/internet \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-X GETSample Response
{
"success": true,
"code": "00000",
"message": "Fetched successfully",
"data": [
{
"id": 1,
"provider": "AIRTEL",
"providerLogoUrl": "assets/images/bills/Airtel-Data.jpg"
},
{
"id": 2,
"provider": "MTN",
"providerLogoUrl": "assets/images/bills/MTN-Data.jpg"
},
{
"id": 3,
"provider": "GLO",
"providerLogoUrl": "assets/images/bills/GLO-Data.jpg"
},
{
"id": 4,
"provider": "9MOBILE",
"providerLogoUrl": "assets/images/bills/9mobile-Data.jpg"
},
{
"id": 5,
"provider": "SMILE4G",
"providerLogoUrl": "assets/images/bills/Smile-Payment.jpg"
}
]
}Try it out
Response Fields
| Field | Type | Description |
|---|---|---|
success | Boolean | Indicates if request was successful |
code | String | Response code |
message | String | Response message |
data | Array | Array of data provider objects |
Provider Object Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Provider ID |
provider | String | Network provider name |
providerLogoUrl | String | URL path to provider logo image |
Get Data Plans
Retrieve available data plans for a specific provider.
Endpoint
GET https://api.budpay.com/api/v2/internet/plans/{provider}Sample Request
curl https://api.budpay.com/api/v2/internet/plans/MTN \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-X GETSample Response
{
"success": true,
"code": "00000",
"message": "Internet Data Plans Fetched successfully",
"data": [
{
"id": 1,
"name": "MTN N100 100MB - (24 Hours)",
"amount": "100"
},
{
"id": 2,
"name": "MTN N25 20MB - (24 Hours)",
"amount": "25"
},
{
"id": 3,
"name": "MTN N200 200MB - 2 days",
"amount": "200"
},
{
"id": 43,
"name": "SME Data Share N50,000 150GB",
"amount": "50000"
}
]
}Try it out
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
provider | String | Yes | Network provider name (MTN, AIRTEL, GLO, 9MOBILE, SMILE4G) |
Response Fields
Plan Object Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Unique plan ID |
name | String | Data plan name with details (data size, validity) |
amount | String | Plan price in Naira |
Purchase Data Bundle
Purchase a data bundle for a mobile number.
Endpoint
POST https://api.budpay.com/api/v2/internet/dataSample Request
curl https://api.budpay.com/api/v2/internet/data \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Encryption: Signature_HMAC-SHA-512" \
-H "Content-Type: application/json" \
-d '{
"provider": "MTN",
"number": "07036218209",
"plan_id": "238",
"reference": "2459392959593939"
}' \
-X POSTSample Response
{
"success": true,
"code": "00000",
"message": "SUCCESSFUL",
"data": {
"orderNo": "211104130931335009",
"reference": "25696593r9622",
"status": "Delivered",
"errorMsg": null
}
}Try it out
Request Parameters
Header Parameters
| Field Name | Description | Required |
|---|---|---|
| Authorization | Bearer token with your secret key | Yes |
| Encryption | Signature_HMAC-SHA-512 for request encryption | Yes |
| Content-Type | application/json | Yes |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
provider | String | Yes | Network provider name (MTN, AIRTEL, GLO, 9MOBILE, SMILE4G) |
number | String | Yes | Recipient mobile number |
plan_id | String | Yes | Data plan ID from plans endpoint |
reference | String | Yes | Unique transaction reference |
Response Fields
| Field | Type | Description |
|---|---|---|
success | Boolean | Indicates if purchase was successful |
code | String | Response code |
message | String | Response message |
data.orderNo | String | Order number from provider |
data.reference | String | Your transaction reference |
data.status | String | Delivery status (Delivered, Pending, Failed) |
data.errorMsg | String | Error message if any (null on success) |
Supported Providers
| Provider | Network | Description |
|---|---|---|
| MTN | MTN Nigeria | MTN data bundles |
| AIRTEL | Airtel Nigeria | Airtel data bundles |
| GLO | Glo Nigeria | Glo data bundles |
| 9MOBILE | 9mobile Nigeria | 9mobile data bundles |
| SMILE4G | Smile Telecom | Smile 4G data plans |
Purchase Status
| Status | Description |
|---|---|
Delivered | Data bundle delivered successfully |
Pending | Purchase being processed |
Failed | Purchase failed (check errorMsg) |
Error Handling
400 Bad Request
{
"success": false,
"message": "Invalid request parameters"
}401 Unauthorized
{
"success": false,
"message": "Authentication failed"
}422 Validation Error
{
"success": false,
"message": "Validation error",
"errors": {
"number": ["Invalid phone number format"],
"plan_id": ["Plan ID is required"]
}
}Best Practices
Tip: Always fetch the latest data plans before purchase to ensure accurate pricing and availability.
- Fetch Latest Plans: Query plans endpoint before each purchase
- Validate Phone Number: Ensure phone number matches the provider's network
- Unique References: Generate unique reference IDs for each transaction
- Check Balance: Verify wallet balance before purchase
- Store Order Numbers: Save order numbers for customer support queries
- Handle Status: Implement proper handling for pending and failed statuses
- User Confirmation: Display plan details for user confirmation before purchase
Data Purchase Workflow
💡
Process Flow: Get providers → Select provider → Get plans → Select plan → Purchase data
- Get Providers: Fetch available data providers
- Select Provider: User selects their network provider
- Get Plans: Retrieve data plans for selected provider
- Display Plans: Show plans with data size, validity, and price
- User Selection: User selects plan and enters phone number
- Generate Reference: Create unique transaction reference
- Purchase Data: Submit purchase request
- Track Status: Monitor delivery status
- Notify User: Inform user of successful delivery
Security Considerations
⚠️
Security: The Encryption header with HMAC-SHA-512 signature is required for all data purchase requests.
- HMAC Signature: Always include the
Encryption: Signature_HMAC-SHA-512header - Server-Side Only: Never expose secret keys in frontend code
- HTTPS Only: All requests must use secure HTTPS connections
- Reference IDs: Use unpredictable reference IDs to prevent replay attacks
- Validate Input: Sanitize phone numbers and plan IDs before submission
Next Steps
- Airtime Providers - Purchase mobile airtime
- Electricity Bills - Pay electricity bills
- Cable TV - Subscribe to cable TV services
- Transaction History - View purchase history