# Query a product rate plan charge with Dynamic Pricing Returns a product rate plan charge (PRPC) by evaluating Dynamic Pricing against the provided attribute values. If a matching rate-card row is found, its pricing is returned; otherwise, the default charge-level pricing is used (if defined). This operation can be used to simulate pricing resolution without creating or updating the charge. Endpoint: POST /commerce/charges/query Version: 2026-02-20 Security: bearerAuth ## Header parameters: - `Idempotency-Key` (string) Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. - `Accept-Encoding` (string) Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it. - `Content-Encoding` (string) Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. - `Zuora-Entity-Ids` (string) An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header. - `Zuora-Org-Ids` (string) Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs. - `Zuora-Track-Id` (string) A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote ('). ## Request fields (application/json): - `product_rate_plan_key` (string) Unique identifier (key) of the Product Rate Plan (PRP) to query. This can be the PRP ID or the PRP number configured in your system. Example: "11dc762a07064ce496af73ff4cfb5614" - `expand` (object) Optional flags to expand related resources in the response. - `expand.product_rate_plan_charges` (boolean) Whether to include Product Rate Plan Charges (PRPCs) in the response. Example: true - `attributes` (array) Optional attribute values to use when evaluating Dynamic Pricing for the PRP or its charges. All required attributes must be supplied if the PRP or PRPC is configured to require them. - `attributes.name` (string, required) Attribute name, for example, Age, Region, EffectiveDate, AccountContext. Example: "Age" - `attributes.value` (any) Attribute value used for price evaluation. The value can be a string, number, or boolean, depending on the attribute type. - Enclose the value in quotation marks ("") if it is a string, for example, "Liquidity Provider", "Y", "External". - Do not use quotation marks for numeric or boolean values, for example, 98, 5, true, false. Example: "Liquidity Provider" - `evaluation_level` (string) Controls how pricing is evaluated for the charge. Supported values: - LIST_PRICE: evaluate pricing at the list-price level. - EXTENDED_PRICE: evaluate pricing at the extended-price level. If not specified, the default is LIST_PRICE. Enum: "LIST_PRICE", "EXTENDED_PRICE" ## Response 200 fields (application/json): - `accounting` (object) Accounting fields returned by the API. *Type fields are derived from the tenant's chart of accounts and are read-only. - `accounting.accountingCode` (string) An accounting code associated with the charge for reporting or ERP mapping. Typically a short code or identifier, not the GL account name. Example: "PRPC-REV-001" - `accounting.accountsReceivableAccount` (string) Accounts Receivable (AR) account to book invoices for this charge. Must match an existing account in the tenant's chart of accounts. - `accounting.accountsReceivableAccountType` (string) System-derived type/category of the AR account from the chart of accounts. Examples include "AccountsReceivable". - `accounting.adjustmentLiabilityAccount` (string) The name of the account where the Account Type is "Adjustment Liability". Example: "adjustL-1" - `accounting.adjustmentLiabilityAccountType` (string) System-derived type/category of the Adjustment Liability account from the chart of accounts. Examples include "AdjustmentLiability". - `accounting.adjustmentRevenueAccount` (string) The name of the account where the Account Type is "Adjustment Revenue". Example: "adjustRev-1" - `accounting.adjustmentRevenueAccountType` (string) System-derived type/category of the Adjustment Revenue account from the chart of accounts. Examples include "AdjustmentRevenue". - `accounting.contractAssetAccount` (string) The name of the account where the Account Type is "Contract Asset". Example: "CA-2" - `accounting.contractAssetAccountType` (string) System-derived type/category of the Contract Asset account from the chart of accounts. Example: "ContractAsset" - `accounting.contractLiabilityAccount` (string) The name of the account where the Account Type is "Contract Liability". Example: "CL-2" - `accounting.contractLiabilityAccountType` (string) System-derived type/category of the Contract Liability account from the chart of accounts. Examples include "ContractLiability". - `accounting.contractRecognizedRevenueAccount` (string) Recognized revenue account used specifically for contract-based recognition flows. Must match an existing account in the tenant's chart of accounts. - `accounting.contractRecognizedRevenueAccountType` (string) System-derived type/category of the Contract Recognized Revenue account from the chart of accounts. Example: "RecognizedRevenue" - `accounting.deferredRevenueAccount` (string) Deferred revenue (liability) account to book revenue before recognition. Must match an existing account in the tenant's chart of accounts. - `accounting.deferredRevenueAccountType` (string) System-derived type/category of the Deferred Revenue account from the chart of accounts. Example: "DeferredRevenue" - `accounting.recognizedRevenueAccount` (string) The name of the account where the Account Type is "Recognized Revenue". Example: "ContractRevRec-1" - `accounting.recognizedRevenueAccountType` (string) System-derived type/category of the Recognized Revenue account from the chart of accounts. Example: "RecognizedRevenue" - `accounting.unbilledReceivablesAccount` (string) The name of the account where the Account Type is "Unbilled Receivables". Example: "unbilledR-1" - `accounting.unbilledReceivablesAccountType` (string) System-derived type/category of the Unbilled Receivables account from the chart of accounts. Example: "UnbilledReceivables" - `accounting.productRatePlanChargeId` (string) The ID of your product rate plan charge. Example: "2c92c0f962470b8101624b869fcd45fc" - `attributes` (array) Attribute metadata associated with Dynamic Pricing for this charge. Example: [] - `billCycle` (object) Example: {"dayOfMonth":5,"period":"bill_cycle_period_month","periodAlignment":"align_to_charge","timing":"in_advance","type":"specific_day_of_month"} - `billCycle.dayOfMonth` (integer) Specific day of month to bill when type = specific_day_of_month. Example: 5 - `billCycle.period` (string) Billing period length. Example: "bill_cycle_period_month" - `billCycle.periodAlignment` (string) How the billing period start aligns. Example: "align_to_charge" - `billCycle.timing` (string) Whether the charge bills before or after the service period. Example: "in_advance" - `billCycle.type` (string) Bill-cycle mode (inherit defaults or set specific day rules). Example: "specific_day_of_month" - `chargeFunction` (string) Internal function/category of the charge used by rating. Example: "charge_function_standard" - `chargeModel` (string) Pricing model that determines how the amount is calculated. Example: "flat_fee" - `chargeType` (string) Whether the charge recurs, rates usage, or is a one-time fee. Example: "recurring" - `createdById` (string) User ID that created the charge record. Example: "53c162482f054f3ca08e1ec82dccfec9" - `createdTime` (string) Timestamp when the charge record was created. Example: "2025-10-13T07:46:02.000+00:00" - `customFields` (object) Tenant-specific custom field values on the charge. Example: {} - `deliverySchedule` (object) Day-of-week delivery settings when delivery scheduling is enabled. - `deliverySchedule.frequency` (string) Delivery frequency label for schedule rules. - `deliverySchedule.friday` (boolean) Deliver on Friday. - `deliverySchedule.monday` (boolean) Deliver on Monday. - `deliverySchedule.saturday` (boolean) Deliver on Saturday. - `deliverySchedule.sunday` (boolean) Deliver on Sunday. - `deliverySchedule.thursday` (boolean) Deliver on Thursday. - `deliverySchedule.tuesday` (boolean) Deliver on Tuesday. - `deliverySchedule.wednesday` (boolean) Deliver on Wednesday. - `discountOptions` (object) How discount charges apply and interact with other discounts. Example: {"applyDetails":[],"applyTo":[],"applyToBillingPeriodPartially":false,"reflectDiscountInNetAmount":false,"rollover":false,"stackedDiscount":false} - `discountOptions.applyDetails` (array) Per-target discount application details (if populated). Example: [] - `discountOptions.applyTo` (array) Which components or charges the discount applies to. Example: [] - `discountOptions.applyToBillingPeriodPartially` (boolean) Whether the discount duration can partially align to a period. - `discountOptions.reflectDiscountInNetAmount` (boolean) Whether discounts reduce the net amount on invoices. - `discountOptions.rollover` (boolean) Whether unused discount can roll over to future periods. - `discountOptions.stackedDiscount` (boolean) Whether this discount stacks with other discounts. - `drawdown` (object) Prepaid/drawdown configuration when using prepaid with drawdown. Example: {} - `endDateCondition` (string) Rule for when the charge ends. Example: "subscription_end" - `upToPeriodsType` (string) Unit used for the fixed period when endDateCondition is fixed_period, for example, billing periods or days. Example: "billing_periods" - `upToPeriods` (integer) Number of periods, in units of upToPeriodsType, that the charge remains active when endDateCondition is fixed_period. - `extendedPrice` (object) Calculated extended price details (model-dependent). Example: {} - `id` (string) Unique identifier of the product rate plan charge (PRPC). Example: "ad95b694d2b8442b84dc8ad26561c7d7" - `isChargeLevelMinCommit` (boolean) Whether a minimum commit is enforced at the charge level. - `isCommitted` (boolean) Indicates if the charge definition is committed/finalized. - `labels` (object) Free-form labels/tags attached to the charge. Example: {} - `listPriceBase` (string) List price basis, for example, Per Billing Period, Per Month, Per Year. Example: "Per_Billing_Period" - `specificListPriceBase` (integer) The number of months for the list price base of the charge. This field is used when the value of the ListPriceBase field to Per Specific Months. The value must be a positive integer between 1 and 120 inclusive. Notes: - This field is available only if you have the Annual List Price feature enabled. - To use this field, you must set the X-Zuora-WSDL-Version request header to 129 or later. Otherwise, an error occurs. - The value of this field is null if you do not set the value of the ListPriceBase field to Per Specific Months. - `mergedRateCards` (array) Effective rate-card rows after merges (if any). Example: [] - `name` (string) Display name of the charge in the plan. Example: "Flat PRPC 1" - `negotiatedRateCards` (array) Customer- or deal-specific rate-card rows applied by negotiation. Example: [] - `netsuite` (object) NetSuite integration attributes mapped for this charge. Example: {} - `ocmJsonByCurrency` (object) Offer/OCM metadata keyed by currency (internal use). Example: {} - `organizationLabels` (array) Organization-level labels associated with the charge. Example: [] - `overageOptions` (object) Overage settings for usage charges. Example: {"includedUnits":0,"unusedUnitsCreditRates":{}} - `overageOptions.includedUnits` (number) Included units before overage starts. - `overageOptions.unusedUnitsCreditRates` (object) Credit rates for unused units (by currency). Example: {} - `prepaid` (boolean) Indicates whether the charge is prepaid. - `prepayment` (object) Prepayment handling and rollover behavior. Example: {"rollover":false,"rolloverApply":"apply_last","rolloverPeriodLength":0,"rolloverPeriods":0} - `prepayment.creditOption` (string) How prepayment credits are applied (if supported). - `prepayment.rollover` (boolean) Whether unused prepayment rolls over. - `prepayment.rolloverApply` (string) Order in which rollover is applied (e.g., apply_last). Example: "apply_last" - `prepayment.rolloverPeriodLength` (integer) Length of each rollover period. - `prepayment.rolloverPeriods` (integer) Number of rollover periods allowed. - `priceChangeOption` (string) How price changes are applied across renewals/amendments. Example: "no_change" - `pricing` (object) Default (charge-level) price configuration by model/currency. Example: {"adjustments":{},"discountAmounts":{},"discountPercentages":{},"flatAmounts":{"USD":100},"maxAmounts":{},"minAmounts":{},"percentages":{},"tiers":[],"unitAmounts":{}} - `pricing.adjustments` (object) Price adjustments metadata. Example: {} - `pricing.discountAmounts` (object) Fixed discount amounts by currency. Example: {} - `pricing.discountPercentages` (object) Percentage discount values by currency. Example: {} - `pricing.flatAmounts` (object) Flat amounts by currency for flat-fee pricing. Example: {"USD":100} - `pricing.maxAmounts` (object) Maximum caps by currency. Example: {} - `pricing.minAmounts` (object) Minimum charges by currency. Example: {} - `pricing.percentages` (object) Percentage price values by currency (model-dependent). Example: {} - `pricing.tiers` (array) Tier definitions for tiered/volume pricing. Example: [] - `pricing.unitAmounts` (object) Per-unit amounts by currency for per-unit/usage pricing. Example: {} - `pricingSummary` (array) Human-readable price summary strings, for example, USD100. Example: ["USD100"] - `pricingWaterfalls` (object) Detailed pricing/waterfall breakdown (if available). Example: {} - `productChargeDefinitions` (array) Underlying charge definitions referenced for pricing lookup. Example: [] - `productRatePlanChargeNumber` (string) PRPC number. Example: "PRPC-00000279" - `productRatePlanId` (string) ID of the plan (PRP) that owns this charge. Example: "ee2d1ce1036c4dd6ae9d6945565ff7a0" - `prorationOption` (string) How proration is handled relative to tenant defaults. Example: "default_from_tenant_setting" - `rateCards` (array) Dynamic Pricing rate-card rows configured on the charge. Example: [] - `revenue` (object) Revenue policy settings for this charge. Example: {"excludeItemBillingFromRevenueAccounting":false,"excludeItemBookingFromRevenueAccounting":false,"legacyReporting":false,"revenueRecognitionRuleName":"Recognize upon invoicing"} - `revenue.excludeItemBillingFromRevenueAccounting` (boolean) If true, item billing is excluded from revenue accounting. - `revenue.excludeItemBookingFromRevenueAccounting` (boolean) If true, item booking is excluded from revenue accounting. - `revenue.legacyReporting` (boolean) Indicator for legacy revenue reporting behaviors. - `revenue.revenueRecognitionRuleName` (string) Name of the revenue rule to apply, for example, "Recognize upon invoicing". Example: "Recognize upon invoicing" - `taxCode` (string) Tax code applied to the charge (for example, a tax category code). Example: "TAX_EXEMPT" - `taxMode` (string) Tax mode for the charge. Example: "non_taxable" - `taxable` (boolean) Whether the charge is taxable. - `triggerEvent` (string) Event that triggers the charge. Example: "contract_effective" - `unitOfMeasure` (string) Unit of measure used for pricing (for example, Each, Seats). Example: "Each" - `updatedById` (string) User ID that last updated the charge record. Example: "53c162482f054f3ca08e1ec82dccfec9" - `updatedTime` (string) Timestamp when the charge record was last updated. Example: "2025-10-13T07:46:02.000+00:00" - `useTenantDefaultForPriceChange` (boolean) Whether tenant defaults govern price change behavior. Example: true ## Response 400 fields (application/json): - `errors` (array) - `errors.code` (string) Machine-readable error code identifying the failure type. - `errors.message` (string) Human-readable description of the error that provides more context about what went wrong. - `success` (boolean) ## Response 401 fields (application/json): - `message` (string) Error message. If the error message is "Authentication error", ensure that the Authorization request header contains valid authentication credentials, then retry the request. See [Authentication](https://developer.zuora.com/docs/guides/authentication/) for more information. If the error message is "Failed to get user info", retry the request.