Vietnam Electricity Bill API
Compute an EVN electricity bill: the 5-tier household tariff from 1/11/2026, VAT, prorating across a price change, business rates and room splits.
Send the kWh used (or the two meter readings) and get the household bill under the EVN retail tariff in force on that date: the 5-tier schedule of QĐ 2892/QĐ-BCT from 1/11/2026 (100 / 100 / 200 / 300 kWh, then the rest), or the earlier 6-tier schedules (QĐ 1279/QĐ-BCT, QĐ 2699/QĐ-BCT). The answer lists every tier, the amount before VAT, VAT (8% until 31/12/2026 under NĐ 174/2025, 10% after) and the total. compare=true adds the difference against the previous tariff.
When the reading period (from – to) spans a tariff change, the kWh and the tier sizes are split by days, as EVN does without remote-read data. persons applies the tenant quota (4 registered persons = one household), tenant_flat=true bills everything at the tier-2 price (short leases without declared tenants), and amount works backwards from a bill to the kWh.
For boarding houses, rooms splits a bill between sub-meters: proportionally (common areas shared equally, by use, or kept by the landlord), at a fixed price per kWh, or with each room billed as its own household. customer also covers production, business, accommodation, EV charging, schools and public lighting with peak / normal / off-peak kWh by voltage.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
kwh | query|body | number | no | kWh used in the period (or send start_reading + end_reading). | |
start_reading | query|body | number | no | Meter reading at the start of the period. | |
end_reading | query|body | number | no | Meter reading at the end of the period. | |
date | query|body | string | no | Date whose tariff applies (YYYY-MM-DD, default today). | |
from | query|body | string | no | Previous reading date; with to, splits the period at tariff changes. | |
to | query|body | string | no | Current reading date. | |
customer | query|body | string | no | household | household, production, business, accommodation, ev_charging, health_education, public_admin. |
voltage | query|body | string | no | low | Non-household: low (≤ 1 kV), medium, high (35–220 kV), extra_high (≥ 220 kV). |
peak_kwh | query|body | number | no | Non-household: kWh at peak hours (offpeak_kwh, normal_kwh likewise). | |
persons | query|body | number | no | Registered persons (tenants): quota = persons / 4 households. | |
households | query|body | number | no | 1 | Number of household quotas on the meter. |
tenant_flat | query|body | boolean | no | Bill all kWh at the tier-2 price. | |
amount | query|body | number | no | Reverse: bill amount incl. VAT -> kWh. | |
rooms | body | array | no | Room split: [{"name":"P1","kwh":80}, {"name":"P2","start_reading":100,"end_reading":190}]. | |
split | body | string | no | proportional | proportional, fixed_price (with price_per_kwh) or separate; common = equal / proportional / landlord. |
vat_percent | query|body | number | no | Override the VAT rate. | |
compare | query|body | boolean | no | Add the difference with the previous tariff. |
Example
curl "https://apibox.io.vn/v1/vn-electricity?kwh=250" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/vn-electricity?kwh=250', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/vn-electricity?kwh=250",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-electricity?kwh=250');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"customer": "household",
"kwh": 250,
"amount_before_vat": 563700,
"vat_percent": 8,
"vat": 45096,
"total": 608796,
"segments": [
{
"tariff": "QĐ 2892/QĐ-BCT",
"effective_from": "2026-11-01",
"kwh": 250,
"amount": 563700,
"tiers": [
{
"tier": 1,
"kwh": 100,
"price": 1901,
"amount": 190100,
"limit": 100
},
{
"tier": 2,
"kwh": 100,
"price": 2289,
"amount": 228900,
"limit": 100
},
{
"tier": 3,
"kwh": 50,
"price": 2894,
"amount": 144700,
"limit": 200
}
]
}
],
"quota": {
"households": 1
},
"tariff": {
"decree": "QĐ 2892/QĐ-BCT",
"effective_from": "2026-11-01",
"tiers": [
{
"tier": 1,
"kwh": 100,
"price": 1901
},
{
"tier": 2,
"kwh": 100,
"price": 2289
},
{
"tier": 3,
"kwh": 200,
"price": 2894
},
{
"tier": 4,
"kwh": 300,
"price": 3456
},
{
"tier": 5,
"kwh": null,
"price": 3844
}
]
},
"reviewed": "2026-11-11"
}
Use cases
- Show the monthly bill in a smart-home or energy app
- Split the bill between rooms in a boarding-house management app
- Estimate savings for a solar or ESG calculator
- Check a business bill with peak and off-peak kWh
FAQ
Which tariff is used?
The one in force on date (or the reading date to): QĐ 2892/QĐ-BCT from 1/11/2026, earlier schedules before. Every answer names the decision.
How is a period spanning a price change handled?
kWh and tier limits are split pro rata by days between the old and new tariff, which is what EVN does when there is no remote-read data.
Is VAT included?
Tariff prices exclude VAT; the answer adds VAT at 8% until 31/12/2026 (NĐ 174/2025) and 10% from 2027. Override with vat_percent.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.