Preloader

Education Bill Payment

This endpoint is used to purchase education bill payments.

Endpoint: POST {{base_url}}/vas/education/purchase-education
Parameter Type Details
bill_type string id_ of the Provider selected
payment string variation_code gotten from education payments endpoint
phone_number string Customer Phone Number
amount decimal variation_amount gotten from the education payments endpoint
                    
                        Request Example (guzzle)
                        

<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', '{{base_url}}/vas/education/purchase-education', [
'json' => [
  'bill_type' => 'xxxxxxxxxxx',
  'payment' => 'xxxxxxxxxx',
  'amount' => '100.00',
  'phone_number' => 'xxxxxxxxxxx',
 ],
'headers' => [
  'Authorization' => 'Bearer {{access_token}}',
  'client-id' => 'sdaH23sE5Th4*******dDF4df',
  'accept' => 'application/json',
  'content-type' => 'application/json',
 ],
]);
echo $response->getBody();
                
                        
**Response: SUCCESS (200 OK)**
{
 "message": null,
"data": {
 "clientId": "673f225ce994ba0024cced6e",
 "serviceCategoryId": "61e989f20e69308aa37a7a9f",
 "reference": "4edfab8fab3f47e7819764a140b95ba5",
 "status": "successful",
 "amount": "1500",
 "id": "67d3f91132ebf265b484a585",
"reciever": {
 "number": null,
 "customerNumber": null,
 "distribution": "GOTV",
 "vendType": "",
}
}
}
                    
                        
**Response: ERROR (403 FAILED)**
{
 "message": {
 "code": 403,
 "error": [
  "Requested with invalid token!"
 ]
},
"data": [],
"type": "error"
}