AIRTIME AND DATA
These are API suites that allow you to vend airtime and data. Please note that the equivalent value of all data and airtime vended will be deducted from your SQUAD account.
API KEYS (Test Environment)
- Create an account on our sandbox environment: sandbox.squadco.com
- Retrieve keys from the bottom of the Get Started Page
Any request made without the authorization key (secret key) will fail with a 401 (Unauthorized) response code.
The authorization key is sent via the request header as Bearer Token Authorization
Example: Authorization: Bearer sandbox_sk_94f2b798466408ef4d19e848ee1a4d1a3e93f104046f
VEND AIRTIME
This API allows you to vend airtime. The minimum amount that can be vended is 50 naira.
This API vends Airtime
Parameters
Body
phone_number*
String
11 digit phone number. Format: : '08139011943'
amount*
Integer
Amount is in Naira.
Responses
{
"status": 200,
"success": true,
"message": "Success",
"data": {
"reference": "app_08139011943_5000_1690387362399",
"amount": "5000.00",
"merchant_amount": "4900.00",
"phone_number": "08139011943",
"merchant_id": "T6AGJQEY",
"wallet_batch_id": "20230726160242715_490000_T6AGJQEY_AIRTIME_NGN",
"transaction_id": "app_08139011943_5000_1690387362399",
"type": "airtime",
"action": "debit",
"status": "pending",
"meta": "{"vending_status":"pending","status_code":"301","message":"pending confirmation","phonenumber":"08139011943","transaction_id":"app_08139011943_5000_1690387362399","network":"MTN"}",
"createdAt": "2023-07-26T16:02:43.341Z"
}
}
{
"success": false,
"message": "",
"data": {}
}
{
"success": false,
"message": "Merchant authentication failed",
"data": {}
}
Sample Request
{
"phone_number": "08139011943",
"amount": 5000
}
VEND DATA BUNDLES
This is the data bundle vending endpoint.
Parameters
Body
phone_number*
String
11 digit phone number. Format: : '08139011943'
plan_code*
String
The plan code is gotten from the Get Plan Code endpoint and usually in the format: '1001'
Responses
{
"status": 200,
"success": true,
"message": "Success",
"data": {
"reference": "app_7062918558_100_1001_1679914203047",
"amount": "100.00",
"merchant_amount": "98.00",
"phone_number": "+2347062918558",
"merchant_id": "AABBCCDDEEFFGGHHJJKK",
"wallet_batch_id": "BC8BE65JWG44ZW7AN9KG",
"transaction_id": "edf867fa-8ad6-4eac-bd87-6e5f8ec9b945",
"type": "data",
"action": "debit",
"status": "success",
"meta": "{"vending_status":"success","status_code":"200","message":"successfully submitted for processing","phonenumber":"07062918558","transaction_id":"edf867fa-8ad6-4eac-bd87-6e5f8ec9b945","network":"MTN"}",
"createdAt": "2023-03-27T10:50:04.073Z"
}
}
{
"success": false,
"message": "",
"data": {}
}
{
"success": false,
"message": "Merchant authentication failed",
"data": {}
}
Sample Request
{
"phone_number": "07062918558",
"amount": 100,
"plan_code": "1001"
}
GET DATA BUNDLES
This API returns all available data bundle plans for all telcos
This API returns all available data bundle plans for all telcos
Parameters
Query
network*
String
Teleco ID: MTN, GLO, AIRTEL, 9MOBILE
Responses
{
"status": 200,
"success": true,
"message": "Success",
"data": [
{
"plan_name": "MTN data_plan",
"bundle_value": "100MB ",
"bundle_validity": " Daily Plan",
"bundle_description": " Daily Plan",
"bundle_price": "100",
"plan_code": "1001",
"network": "MTN"
},
{
"plan_name": "MTN data_plan",
"bundle_value": "200MB",
"bundle_validity": " 2-day Plan",
"bundle_description": " 2-day Plan",
"bundle_price": "200",
"plan_code": "1002",
"network": "MTN"
},
{
"plan_name": "MTN data_plan",
"bundle_value": "350MB",
"bundle_validity": " Weekly Plan",
"bundle_description": " Weekly Plan",
"bundle_price": "300",
"plan_code": "1003",
"network": "MTN"
},
{
"plan_name": "MTN data_plan",
"bundle_value": "750MB",
"bundle_validity": " 2-Week plan",
"bundle_description": " 2-Week plan",
"bundle_price": "500",
"plan_code": "1004",
"network": "MTN"
},
{
"plan_name": "MTN data_plan",
"bundle_value": "1500GB",
"bundle_validity": "365 days",
"bundle_description": "365 days",
"bundle_price": "450000",
"plan_code": "1111",
"network": "MTN"
}
]
}
{
"success": false,
"message": "",
"data": {}
}
{
"success": false,
"message": "Merchant authentication failed",
"data": {}
}
RETRIEVE AIRTIME AND DATA TRANSACTIONS
This API provides details on airtime and data transactions conducted by a merchant, allowing for the use of multiple filters.
This API returns airtime and data transactions done by a merchant.
Parameters
Query
page*
Integer
The page of the transaction you want to view
perPage*
Integer
Number of transaction you want to view per page
action*
string
The type of transaction you want to see: 'debit'
reference*
string
Reference of the transaction you want to see
Responses
{
"status": 200,
"success": true,
"message": "Success",
"data": {
"count": 5,
"rows": [
{
"reference": "app_08139011943_5000_1690387362399",
"amount": "5000.00",
"merchant_amount": "4900.00",
"phone_number": "08139011943",
"merchant_id": "T6AGJQEY",
"wallet_batch_id": "20230726160242715_490000_T6AGJQEY_AIRTIME_NGN",
"transaction_id": "app_08139011943_5000_1690387362399",
"type": "airtime",
"action": "debit",
"status": "pending",
"meta": "{"vending_status":"pending","status_code":"301","message":"pending confirmation","phonenumber":"08139011943","transaction_id":"app_08139011943_5000_1690387362399","network":"MTN"}",
"createdAt": "2023-07-26T16:02:43.341Z"
},
{
"reference": "app_08132448598_500_1001_1690387247434",
"amount": "500.00",
"merchant_amount": "490.00",
"phone_number": "08132448598",
"merchant_id": "T6AGJQEY",
"wallet_batch_id": "20230726160047736_49000_T6AGJQEY_DATA__NGN",
"transaction_id": null,
"type": "data",
"action": "debit",
"status": "failed",
"meta": null,
"createdAt": "2023-07-26T16:00:48.212Z"
},
{
"reference": "app_08139011943_5000_1001_1690387152681",
"amount": "5000.00",
"merchant_amount": "4900.00",
"phone_number": "08139011943",
"merchant_id": "T6AGJQEY",
"wallet_batch_id": "20230726155914250_490000_T6AGJQEY_DATA__NGN",
"transaction_id": null,
"type": "data",
"action": "debit",
"status": "failed",
"meta": null,
"createdAt": "2023-07-26T15:59:15.602Z"
},
{
"reference": "app_08139011943_5000_1690363943917",
"amount": "5000.00",
"merchant_amount": "4900.00",
"phone_number": "08139011943",
"merchant_id": "T6AGJQEY",
"wallet_batch_id": "20230726093224159_490000_T6AGJQEY_AIRTIME_NGN",
"transaction_id": "app_08139011943_5000_1690363943917",
"type": "airtime",
"action": "debit",
"status": "pending",
"meta": "{"vending_status":"pending","status_code":"301","message":"pending confirmation","phonenumber":"08139011943","transaction_id":"app_08139011943_5000_1690363943917","network":"MTN"}",
"createdAt": "2023-07-26T09:32:24.638Z"
}
]
}
}
{
"success": false,
"message": "",
"data": {}
}
{
"success": false,
"message": "Merchant authentication failed",
"data": {}
}
Going Live
To go live, follow these steps:
- Change the base URL for your endpoints from https://sandbox-api-d.squadco.com to https://api-d.squadco.com.
- Sign up for our Live Environment.
- Complete your Know Your Customer (KYC) process.
- Share your Merchant ID with the Technical Account Manager for profiling.
- Use the credentials provided on the live dashboard for authentication.