1app
Create Boldd AccountLogin
  • Introduction
  • Authentication
  • Balance
  • Get Exchange Rate
  • Response Code
  • RECEIVE PAYMENTS
    • Payments
      • Initialize Payment
      • Verify Payment
      • Payment List
      • Payment Details
    • Inline/Popup Checkout
    • Payouts / Settlements
      • Payouts List
      • Settlement Transactions
    • Dispute Management
      • Fetch Disputes
      • Accept a Dispute
      • Decline a Dispute
    • Customers List
    • Webhook Notifications
    • Repush Notification
  • Virtual Accounts
    • Get Available Banks
    • Setup Preferred Bank
    • Generate Account
    • Virtual Account List
    • Account Transactions
    • Virtual Account Webhook
      • Notifications history
  • MAKE PAYMENTS
    • Airtime Purchase
    • Send Money
      • Verify Account Number
      • Make Transfer
    • Data Purchase
      • Data Plans
      • Data Bundle
    • Electricity
      • Electricity Billers
      • Verify Meter Number
      • Vend Electricity
    • Cable TV
      • Cable TV List
      • Verify IUC
      • Vend CableTv
    • Bank List
    • Payment Status
  • CUSTOMERS
    • Create Customer
  • VIRTUAL CARDS
    • Create Card Account
    • Cards Issuance
    • Card Funding
    • Card Transactions
    • Get all Cards
    • Cards Details
    • Cards Pan
    • Freeze and Unfreeze Card
  • USD Account
    • Create USD Account
  • IDENTITY
    • BVN Check
    • NIN Checks
  • SUB-ACCOUNTS
    • Create a Sub-Account
    • Attach Bank to a Sub-Account
    • Attach Payout Account
    • Get All Sub-Accounts
    • Sub-Accounts History
    • Sub-Accounts Wallet
  • Miscellaneous
    • Create Wallet
    • Universal Blacklist
  • Contact
    • Contact Us
Powered by GitBook
On this page
  • Buy Electricity
  • Sample Response

Was this helpful?

  1. MAKE PAYMENTS
  2. Electricity

Vend Electricity

Make a call to our electricity purchase endpoint to buy electricity

Buy Electricity

POST {{base_url}}/electricity

Headers

Name
Type
Description

authorization*

SECRET_KEY

Set value to Bearer SECRET_KEY

Request Body

Name
Type
Description

meterno*

String

provider*

String

Disco/Provider

amount*

String

Amount to vend

vendtype*

String

pckgid*

String

address*

String

metername

String

{
    "status": true,
    "message": "Success - Bills Payment  effected successfully - Token: 0283-6213-2450-8322-0153",
    "txref": "API2650280812e8401",
    "charged": 10030,
    "token": "Bills Payment  effected successfully - Token: 0283-6213-2450-8322-0153",
    "newbal": 300094.79
}

Take a look at how you might do this:

curl --location --request POST 'https://api.oneappgo.com//v1/electricity' \
--header 'Authorization: Bearer SECREY_KEY' \
--form 'meterno="62320094725"' \
--form 'metername="BRAHIM MARY OPE"' \
--form 'provider="IBADAN"' \
--form 'amount="10000"' \
--form 'vendtype="PREPAID"'
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://api.oneappgo.com/v1/electricity',
  'headers': {
    'Authorization': 'Bearer SECREY_KEY'
  },
  formData: {
    'meterno': '62320094725',
    'metername': 'BRAHIM MARY OPE',
    'provider': 'IBADAN',
    'amount': '10000',
    'vendtype': 'PREPAID'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.oneappgo.com/v1/electricity',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('meterno' => '62320094725','metername' => 'BRAHIM MARY OPE','provider' => 'IBADAN','amount' => '10000','vendtype' => 'PREPAID'),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer SECREY_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.oneappgo.com/v1/electricity"

payload={'meterno': '62320094725',
'metername': 'BRAHIM MARY OPE',
'provider': 'IBADAN',
'amount': '10000',
'vendtype': 'PREPAID'}
files=[

]
headers = {
  'Authorization': 'Bearer SECREY_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
var headers = {
  'Authorization': 'Bearer SECREY_KEY'
};
var request = http.MultipartRequest('POST', Uri.parse('https://api.oneappgo.com/v1/electricity'));
request.fields.addAll({
  'meterno': '62320094725',
  'metername': 'BRAHIM MARY OPE',
  'provider': 'IBADAN',
  'amount': '10000',
  'vendtype': 'PREPAID'
});

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

Sample Response

{
    "status": true,
    "message": "Success - Bills Payment  effected successfully - Token: 0283-6213-2450-8322-0153",
    "txref": "API2650280812e8401",
    "charged": 10030,
    "token": "Bills Payment  effected successfully - Token: 0283-6213-2450-8322-0153",
    "newbal": 300094.79
}
PreviousVerify Meter NumberNextCable TV

Last updated 6 months ago

Was this helpful?

Meter holder number as returned by the endpoint

Vend type as seen on the endpoint

As seen from the endpoint response

As seen from the endpoint response

Meter holder name as returned by the endpoint

verify electricity
verify electricity
verify electricity
verify electricity
verify electricity