VALUE ADDED SERVICES (VAS)
These are suites of API that allows you vend airtime and data. Please note that the equivalent value of all data and airtime vended will be charged from your SQUAD WALLET.
API KEYS (Test Environment)
Create an account on our sandbox environment: sandbox.squadco.com
Retrieve keys from the bottom of the Get Started Page
Authorization 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 vend airtime. Minimum amount that can be vended is 50 naira.
This API vends Airtime
POST
https://sandbox-api-d.squadco.com/vending/purchase/airtime
Request Body
phone_number*
String
11 digit phone number. Format: : "08139011943"
amount*
Integer
Amount is in Naira.
{
"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"
}
}
Sample Request
{
"phone_number": "08139011943",
"amount": 5000
}
VEND DATA BUNDLES
This API allows you vend data bundles.
POST
https://sandbox-api-d.squadco.com/vending/purchase/data
This is the data bundle vending endpoint.
Request 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"
Sample Request
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
GET
https://sandbox-api-d.squadco.com/vending/data-bundles?network=MTN
Query Parameters
network*
String
Teleco ID: MTN, GLO, AIRTEL, 9MOBILE
{
"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"
}
]
}
GET ALL TRANSACTIONS
This API returns all transactions done by a merchant.
This API returns all transactions done by a merchant.
GET
https://api-d.squadco.com/vending/transactions?page=1&perPage=4&action=debit
Query Parameters
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"
{
"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"
}
]
}
}
GO LIVE
To go live, simply: 1. Change the base URL for your endpoints from sandbox-api-d.squadco.com to api-d.squadco.com
2. Sign up on our Live Environment
3. Complete your KYC
4. Use the secret keys provided on the dashboard to authenticate your live transactions
Last updated