BillingMeta
The charge for this response as billing priced it. Present on every billed success response; absent on free endpoints and on error responses, which are never charged.
Type: object.
| Name | Type | Description |
|---|---|---|
baseCost required | integer | Credits the endpoint costs with up to includedFields response fields. |
decision required | string | Billing's decision for the call, for example allowed_included, allowed_overage, allowed_sandbox, or house. On a call the store pays for under its approval it is allowed (allowed_sandbox for a test key): whether the call fell in the store's included credits is the store's. Such a call also has no X-Credits-Remaining header or trailer, since the balance is the store's; X-Credits-Charged and this block say what the call cost. |
extraFieldCredits required | integer | max(0, fieldCount - includedFields) * extraFieldCost. |
fieldCount required | integer | Number of fields the request resolved to (the standard set when fields is omitted). Two names for one field (unitsPerCase and the deprecated upc) count once. |
includedFields required | integer | Fields covered by baseCost; 0 for fixed-cost endpoints. |
pricingVersion required | string | Billing's pricing version the call was priced under; also in X-Pricing-Version. |
totalCredits required | integer | baseCost + extraFieldCredits: the price of one unit. On a per-request endpoint (unit request or order, or no unit reported) it is the credits this call was charged, also in X-Credits-Charged; on a per-row or per-page endpoint (unit row or page) the charge is totalCredits times quantity, which X-Credits-Charged reports. |
mode | string | live for a production key; test for a sandbox (cd_test_) key. One of: live, test. |
priceSource | string | Which layer priced the call: default (the endpoint's list price, as published in this document), plan (the store's plan carries its own price for this endpoint), subscription (a price agreed for this store), or house (a CompuDime-owned integration, priced at zero). store is the legacy value while billing reports no layer. One of: default, plan, subscription, house, store. |
quantity | integer | How many units this call was charged for: 1 on a per-request endpoint; on a per-row endpoint the rows the response carries, on a per-page endpoint the pages of 100 rows they fill, rounded up (0 when the page came back empty and nothing was charged). Absent when billing reports no unit. |
unit | string | The pricing unit the call was priced by: request or order (the price once per call, the default), row (the price for each row the call returns), or page (the price for each page of 100 rows the call returns, rounded up); CompuDime chooses it per endpoint. Absent when billing reports no unit. One of: request, order, row, page. |
No other fields appear.