All guides
ECONOMICS · 6 MIN READ

How to reconcile proxy bandwidth usage with an invoice

Join the provider invoice to the same route and UTC window as the client logs. Separate observed bytes from the provider’s documented billing meter.

How to reconcile proxy bandwidth usage with an invoice

Quick answer: Match the invoice’s account, route, product, and billing window to the client run, then compare byte categories with the provider’s written meter definition. Client counters describe only the instrumented path; they do not establish what the provider billed. Ask for a breakdown when a material residual remains.

Warning: Start with an owned sandbox endpoint and an authorized test route. A production control requires explicit permission and a fixed traffic allowance; keep it inside the billing window under review. Send one request and stop; traffic charges may apply.

Put the two measurements on one row

Start with the invoice period, account or project, route identifier, package or rate, and the provider’s definition of the billed unit. Then join it to the client run by a stable job ID and UTC window.

Record Capture Limit
Provider invoice Billed unit, quantity, rate, period, adjustments, and route or product label The provider’s meter is authoritative for the charge, but its boundary must be documented
HTTP client Request and response headers, body bytes, redirects, retries, status, and route label A library counter may omit connection overhead or traffic outside that client
Browser transferSize, encodedBodySize, resource URL, resource type, cache state, and context Cross-origin timing can be zero; a field for one resource is not the whole page
Job log Attempt ID, target ID, phase, status, bytes, and accepted or rejected output Redaction and sampling can remove detail needed for a later join
Billing rule Decimal or binary units, headers, retries, failed attempts, minimums, rounding, and exclusions Never infer an absent rule from a close-looking byte total

When capturing headers for reconciliation, measure the byte count of the complete observed request and response metadata before redaction. After that measurement, store only the count and the allowlisted non-secret fields or values needed for the join. Redact Authorization, Proxy-Authorization, Cookie, Set-Cookie, bearer tokens, API keys, and token-like query parameters. Do not export raw headers or full URLs just because the client can record them, and do not describe an allowlisted subset as the complete header byte count.

MDN documents transferSize as including response headers and body size for a resource, with cache and cross-origin limitations. encodedBodySize describes the payload before content decoding, so it can differ from decoded bytes. decodedBodySize describes the payload after decoding. Neither field is a provider invoice field.

Capture a client-side control

For a single permitted HTTP request, capture the same route, target, client version, and retry policy that produced the invoice window. Prerequisites: The shell example passes bash -n with Bash 3.2.57 on macOS. curl 8.7.1 is installed for the proxy request; a successful request requires an authorized endpoint. Install Bash from the official GNU Bash page and curl from the official curl download page if needed. The control below assumes a no-auth route whose source IP is already allowlisted. It keeps credentials out of shell history and the log. Keep PROXY_URL credential-free. For an authenticated route, configure the client separately through its supported private credential configuration; do not put credentials in the proxy URL, command arguments, or output. Keep the output small and record status and timing without saving the page body.

set -eu

: "${PROXY_URL:?Set PROXY_URL without credentials}"
: "${TARGET_URL:?Set TARGET_URL to one permitted HTTPS URL}"

curl --disable --proxy "$PROXY_URL" --noproxy '' \
  --connect-timeout 10 --max-time 30 \
  --silent --show-error --output /dev/null \
  --write-out 'job=example attempt=1 status=%{response_code} proxy_status=%{http_connect} download_bytes=%{size_download} response_header_bytes=%{size_header} total=%{time_total}s\n' \
  "$TARGET_URL"

Illustrative output format for one HTTP CONNECT request:

job=example attempt=1 status=200 proxy_status=200 download_bytes=86 response_header_bytes=189 total=0.025000s

The values illustrate the fields; they are not a provider invoice or latency benchmark.

This curl control counts downloaded body bytes and HTTP-style response-header bytes. Through HTTP CONNECT, curl’s header count can include the proxy’s CONNECT response as well as the target response headers, so the count covers more than origin response headers alone. It does not count request-header bytes. Collect those at a controlled client transport boundary before applying the provider’s billing rule. For browser work, collect resource timing from the same context and record whether the resource came from cache. Playwright exposes request and response events that can be joined to a run ID, but its events still describe browser traffic, not the provider’s billing definition. For Python or another HTTP library, record the library’s observed request and response sizes at the controlled transport boundary.

Reconcile in a fixed order

  1. Confirm that the invoice period and client log use the same UTC start and end. A calendar-day boundary in two time zones can create a real difference.
  2. Match route, account, package, and target workload. Do not join a browser run to an invoice line for a different route or product.
  3. Sum attempts, redirects, request and response headers, body bytes, and retries according to the provider’s written billing rule.
  4. Compare decimal units explicitly. The arithmetic conversion is not evidence that the provider uses the same numerator.
  5. Separate traffic outside the instrumented client: background requests, assets, prefetches, DNS or TLS retries, direct connections, and other workers.
  6. Ask for the provider’s meter breakdown when the residual is material. Send the redacted attempt IDs and period, not credentials or page bodies.

Here is a synthetic reconciliation row, not a provider invoice: in one matching window, the initial attempts contributed 620,000,000 body bytes and 4,000,000 request and response header bytes. That header count covers the complete observed metadata before values were redacted; only the count and allowlisted non-secret fields were retained. All bytes from retry and redirect attempts contributed another 80,000,000 bytes. These categories are disjoint: keep retry and redirect bytes out of the initial-attempt figures before adding them. The instrumented total is 704,000,000 bytes, or 0.704 GB using decimal units. If the invoice says 0.740 GB, the residual is 36,000,000 bytes, or 0.036 GB. Ask which documented meter category explains that residual before changing the client calculation. Do not count the same retry bytes again under a second category.

Explain a variance without inventing a rule

Observation Plausible explanation to test Evidence to request or collect
Invoice is larger than response-body sum Headers, request bytes, retries, redirects, or other workers are included Provider meter definition and attempt-level client log
Browser total is smaller than expected Cache, cross-origin timing restrictions, or resources outside the captured context Cache state, Timing-Allow-Origin, and browser request list
Client total is larger than invoice The client counted decoded bytes or direct traffic, or the invoice excludes a class Client counter definition and provider exclusions
Difference appears only at period edges UTC boundary, rounding, or delayed invoice aggregation Invoice timestamps and provider aggregation window
Same bytes, different invoice quantity Unit conversion, minimums, or adjustments Written unit and line-item breakdown

Do not infer the provider's billing rule from a browser byte field. A close total is a useful lead, not a settled reconciliation. Preserve the original invoice, an immutable redacted run export, the calculation, and the provider’s answer as separate records.

The bandwidth estimation guide models future traffic; this guide starts with an actual invoice. The cost-per-successful-request guide uses a validated-result denominator, which is a different accounting question. For a disputed line, include the support packet.

For a defined traffic route and reconciliation window, create an account and select the workflow and traffic package during onboarding.

Sources and further reading

ProxyLaneTraffic never expires

Premium residential proxies
From $2/GB

Scale your workflows with the tools you already use. Rotating or sticky sessions up to 72 hours.

Try 350 MB for $1.95 View plans

Keep reading

Amazon Scraper API vs Proxy: Choose a Product Data Source

Compare seller APIs, licensed Amazon product data and proxy page checks by record, access scope and reuse rights.

Read guide

Antidetect browser proxy setup: choose a profile guide

Choose the right anti-detect browser proxy guide, map the shared verification steps, and keep account access separate from the network route.

Read guide

Best Proxies for Market Research: Choose by Sample and Cost

Our picks for market research: ProxyLane for small, intermittent projects, plus options for regional tracking, monthly collection and managed extraction.

Read guide