Billing FAQs
FAQs on API Transaction Logs, Usage Counts and Billing Discrepancies
1. Why do your API transaction counts not match our internal counts?
This typically happens because we meter usage at the API hit level, while many client systems count usage at the business request or request body level. Every authenticated API call that reaches our gateway is logged and metered individually. If a single business workflow triggers multiple API calls, retries, or downstream calls, each of those is counted as a separate transaction on our side.
2. We send one request payload. Why do you show multiple hits?
Your system may treat the request as a single logical operation, but technically it can result in:
- Multiple API calls
- Retries due to network or timeout conditions
- Separate calls for validation, enrichment, or async flows
Our billing is based on actual API hits processed, not how the request is logically grouped in your application.
3. Do retries and failed requests count toward usage?
Yes. Any request that reaches our gateway and is processed is logged, regardless of whether it succeeds or fails. This includes retries, timeouts, and non-200 responses. The status code is always available in the transaction logs for full transparency.
4. Why can’t billing be based only on our internal logs?
Client side logs vary significantly across implementations and often:
- Miss retries or parallel calls
- Aggregate multiple API calls into one business event
- Do not log gateway-level failures
As a vendor, we can only guarantee accuracy and auditability based on our gateway logs, which are immutable, timestamped, and consistent across all customers.
5. What is the single source of truth for billing?
The API transaction logs generated at our gateway are the source of truth for billing. These logs capture every request with timestamp, product ID, API name, status code, response time, correlation ID, and client IP.
6. How can we reconcile your logs with our system?
Use the x-client-unique-id header in every API request. We echo the same ID back in the response and store it in our logs. This creates a shared reference point so both teams can trace the exact same transaction without ambiguity.
7. What if we do not send x-client-unique-id?
If the header is not provided, our system generates an internal trace ID. While the transaction is still fully logged, reconciliation becomes slower because there is no client-side reference ID to match against your systems.
8. Why do disputes usually arise without correlation IDs?
Without a shared correlation ID:
- Clients compare aggregated counts instead of individual transactions
- Teams debate assumptions instead of evidence
- Manual reconciliation becomes time consuming and error prone
Correlation IDs shift the discussion from “counts” to specific transactions, which eliminates confusion.
9. Can billing be adjusted to match client-side counting logic?
No. Billing cannot be aligned to client-specific counting logic because it would break consistency, auditability, and fairness across customers. However, we provide full transparency so you can independently verify every billed transaction using logs and correlation IDs.
10. How does this approach protect both sides?
- Clients get verifiable, downloadable logs with exact metadata
- Vendors ensure accurate billing based on real usage
- Disputes are resolved using transaction-level evidence, not assumptions
This model avoids ambiguity, prevents revenue leakage, and significantly reduces back-and-forth between engineering, finance, and operations teams.
11. What is the recommended best practice to avoid future billing disputes?
- Always send a unique x-client-unique-id per API call
- Reconcile using transaction-level logs, not aggregated counts
- Treat gateway-level logs as the authoritative record
Technical FAQs for Engineering Teams
12. At what layer are API transactions logged on your side?
All API transactions are logged at the gateway and NGINX layer. Logging happens when a request successfully reaches our infrastructure and is processed by the gateway. This ensures:
- No application side assumptions
- No dependency on downstream service behavior
- Consistent metering across all products and clients
This is why gateway logs are treated as authoritative.
13. What exactly do you log for each API request?
We log request and response headers only, along with gateway metadata. This includes:
- Timestamp
- Gateway user ID
- Product ID and API name
- HTTP status code
- Response time
- Client correlation ID
- Client IP address
We do not log request bodies or response payloads.
14. Why don’t you log request and response bodies?
Request and response bodies often contain:
- Personally identifiable information
- Sensitive financial or identity data
- Regulated information subject to compliance controls
Storing payloads would introduce privacy, security, and regulatory risks. For this reason, we intentionally restrict logging to headers and metadata only. This approach is aligned with data minimization and privacy best practices.
15. Why are header level logs sufficient for reconciliation?
Headers provide:
- Unique transaction identification via correlation IDs
- Clear attribution of API credentials
- Deterministic counting of API hits
- Zero exposure of sensitive customer data
From a billing and audit perspective, headers give all required evidence without creating compliance risk.
16. What technical reasons cause higher hit counts on vendor logs?
Common reasons include:
- Automatic retries due to network timeouts
- Client side retry logic at SDK or load balancer level
- Parallel calls triggered by async workflows
- Multiple API calls per single business transaction
- Retries caused by non-200 responses
These are often invisible in application level logs but clearly visible at the gateway.
17. How should clients log on their side for accurate reconciliation?
We recommend logging the following fields for every outbound API call:
- Timestamp in UTC
- API endpoint
- HTTP method
- x-client-unique-id
- HTTP status code
- API credential or key identifier
This creates a clean one to one mapping with our gateway logs.
18. How can clients share logs for manual cross verification?
For manual reconciliation, clients can share:
- CSV or JSON extracts of outbound API call logs
- Filtered by date range and API credential
- Including x-client-unique-id and timestamps
No request or response payloads are required or expected.
19. What fields must be present for successful manual reconciliation?
At minimum:
- x-client-unique-id
- Timestamp
- API endpoint or product identifier
- HTTP status code
With these fields, we can deterministically match transactions across systems.
20. Can discrepancies be resolved without correlation IDs?
Yes, but it is significantly slower and more error prone. Without correlation IDs, reconciliation relies on timestamp windows and heuristic matching, which increases ambiguity. Correlation IDs remove interpretation entirely.
21. Why is vendor side metering non negotiable from a technical standpoint?
Because:
- It reflects actual infrastructure usage
- It is consistent across all clients
- It is immune to client specific implementation differences
- It is auditable and reproducible
Client side counts are valuable for internal monitoring but cannot be used as a billing authority.
22. What is the recommended escalation path for billing disputes?
- Identify specific transactions using correlation IDs
- Share client side logs with required fields
- Cross verify against gateway logs
- Resolve at transaction level, not aggregate level
This process avoids prolonged disputes and reduces engineering effort on both sides. Following this document ensures predictable billing, faster dispute resolution, and complete transparency between both teams.