How to reconcile proxy bandwidth by customer
Take two dated readings for the same customer key. Subtract the raw MB readings to find delivered traffic, then subtract the balance MB readings to find the wholesale charge in bandwidth units. Use the pack price you actually paid to turn that second figure into money.
In this guide
Take two readings for the same key
A shop can sell 10 GB on Monday and deliver only part of it that week. To explain the week’s cost, start with the customer’s metered traffic. If their receipt shows GB that never appeared, trace the paid order to its delivery record. Keep the order ID and the associated pool access key ID together on your server.
Read GET /v1/reseller/pool-keys/{keyId} at both ends of the period. Save the key ID, observation time, trafficUsedMB, trafficUsedBalanceMB and usageState. Leave the credential itself out of this record. Use readings with valid counters from the same key and state the actual times you captured them.
Raw MB includes traffic in both directions. The API uses 1,024 MB per GB. The rounded trafficUsedGB is fine for a dashboard label. The MB field preserves the precision you need for the subtraction.
A statement for 2.5 GB of traffic
Consider a customer on an illustrative country-tier reseller account. The shop saved the following readings for one key. Both timestamps are UTC.
| Reading | Raw MB | Balance MB |
|---|---|---|
| Monday, 09:00 | 8,192 | 4,096 |
| Tuesday, 09:00 | 10,752 | 5,696 |
| Period change | 2,560 | 1,600 |
The customer transferred 2.5 GB. Of that, 1,024 MB at a multiplier of 1 and 1,536 MB at 0.375 consumed 1,600 balance MB, or 1.5625 balance GB. At an illustrative acquisition cost of $2.40 per balance GB, this key cost the shop $3.75 for the period. Your customer’s retail price comes from the agreement you sold.
For a flat-rate account, the same 2,560 raw MB would ordinarily consume 2,560 balance MB, costing $6.00 at the same example pack price. New reseller accounts opened from November 16, 2026 generally use the flat rate. Older or individually configured accounts can have different terms. Read your account’s pricing and use the measured balance counter. The wholesale buying guide explains how to quote those units.
Trace discrepancies to their source
Read GET /v1/reseller/pool-keys/{keyId}/usage?days=7&countries=10 for daily history. Its buckets follow the UTC day when usage was processed. A Monday 09:00 to Tuesday 09:00 statement spans two partial buckets. A sum of those two whole days covers a different interval.
- The country rows look short. Include
otherCountrieswhen the API returns only the leading countries. The tier and country tables describe the same traffic from two angles. Adding them together counts it twice. - Old traffic has no tier split. Keep
unattributedMBvisible as an unknown split. Assigning it to today’s most common country changes the evidence. - A day looks empty. Check
observed,observedAtandrawMB. An unobserved row may carry a zero display total and a null raw reading. Label the day unknown. Even an observed bucket can contain only part of a day. - A key was replaced, a counter fell, or an end reading is missing. Keep each key’s readings separate. Record which part of the period you can explain and leave the remainder open for review.
Give the customer a statement they can check
Show the customer the two timestamps, the units their plan uses, opening and closing readings, and the amount used. A raw-GB plan in the example shows 2.5 GB used. A balance-GB plan on the illustrated tiered account shows 1.5625 GB used. Keep your own pack cost in the wholesale ledger.
For a dispute about one session, the per-key daily report cannot establish an exact historical bill for that session. Share the evidence at the level it was recorded. If the billed unit differs from the customer’s order, check how to set the customer’s cap mode before issuing their next allowance. Use your measured cost in the reseller margin calculator.
Common questions
- How far back can I retrieve daily traffic?
- The endpoint accepts requests for up to 365 days. Its daily storage retains roughly 90 days. Save your own dated counter readings if your statements need a longer history.
- Can the change in my account balance settle a single customer’s dispute?
- Other keys and account purchases affect the account-wide figure. Match the disputed order to its own key and compare that key’s counters. For a replacement key, document the handover and each key’s portion separately.