Skip to navigation

Create a product charge definition

View as Markdown

Creates a product charge definition for a charge. You can create as many product charge definitions as needed for one charge.

In the request, you must specify the unique ID or number of the charge for which this charge definition is to be created. The ID or number of a product rate plan is optional.

Note: This operation requires the Attribute-based Pricing feature to be enabled, which is in the Early Adopter phase.

Authentication

AuthorizationBearer

Use Bearer {{token}} in the Authorization header for authentication.

Headers

Idempotency-KeystringOptional<=255 characters
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-EncodingstringOptional

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-EncodingstringOptional

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-Track-IdstringOptional<=64 characters

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 (').

Zuora-Entity-IdsstringOptional

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-VersionstringOptional

The minor API version.

For a list of available minor versions, see API upgrades.

Request

This endpoint expects an object.
billingPeriodstringOptional
The billing period for the product charge definition.
billingTimingenumOptional
The billing timing setting for the product charge definition.
Allowed values:
chargeModelenumOptional
Determines how to calculate charges. Charge models must be individually activated in Zuora Billing administration.
defaultQuantitydouble or nullOptional

The default quantity.

This field is applicable only for one-time and recurring charges.

effectiveEndDatedatetimeOptional
The effective end date of the product charge definition.
effectiveStartDatedatetimeOptional
The effective start date of the product charge definition.
listPriceBaseenumOptional

The list price base.

This field is applicable only for recurring charges.

Note: The Per_Year enum value is available only if you have the Annual List Price feature enabled.

Allowed values:
priceslist of objectsOptional
Container for the prices of the product charge definition.
productRatePlanChargeIdstringOptional
The unique ID of the charge of the charge definition.
productRatePlanChargeNumberstringOptional

The unique number (natural key) of the charge of the charge definition.

productRatePlanIdstringOptional
The unique ID of the product rate plan that uses this charge definition.
productRatePlanNumberstringOptional

The unique number (natural key) of the product rate plan that uses this charge definition.

specificBillingPerioddouble or nullOptional
The specific number of billing periods for the product charge definition.
specificListPriceBaseinteger or nullOptional1-200

The number of months for the list price base of the charge definition. This field is null if the listPriceBase field is not set to Per_Specific_Months.

taxCodestringOptional<=64 characters

Specifies the tax code for taxation rules. This field is required when the Taxable field is set to True.

Note: This value affects the tax calculation of the charge.

taxModeenum or nullOptional

Determines how to define taxation for the charge. This field is required when the Taxable field is set to True.

Note: This value affects the tax calculation of the charge.

Allowed values:
taxablebooleanOptional

Determines whether the charge definition is taxable. When this field is set to True, the TaxMode and TaxCode fields are required.

Character limit: 5

Values: True, False

Note: This value affects the tax calculation of the charge.

termdouble or nullOptional

The number of periods of a termed subscription that is eligible for this charge definition. This field is applicable when the termType field is set to TERMED, and is to be used together with the termPeriodType field.

termPeriodTypeenum or nullOptional
Specifies the period type for the subscription term that is eligible for this charge definition.
Allowed values:
termTypeenum or nullOptional
The type of the subscription that is eligible for this charge definition.
Allowed values:
uomstring or nullOptional

Describes the unit of measure (UOM) configured in Settings > Billing for the charge.

Response headers

Content-EncodingstringOptional

This header is returned if you specify the Accept-Encoding: gzip request header and the response contains over 1000 bytes of data.

Note that only the following MIME types support gzipped responses:

  • application/json
  • application/xml
  • text/html
  • text/csv
  • text/plain
RateLimit-LimitstringOptional

The request limit quota for the time window closest to exhaustion. See rate limits for more information.

RateLimit-Remainingdouble

The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.

RateLimit-Resetdouble

The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.

Zuora-Request-IdstringOptional
The Zuora internal identifier of the API call. You cannot control the value of this header.
Zuora-Track-IdstringOptional
A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
Concurrency-Limit-TypestringOptional

The type of the concurrency limit, which can be Default, High-volume transactions, or Object Query.

For more information, see Concurrent request limits.

Concurrency-Limit-Limitinteger

The total number of the permitted concurrent requests.

For more information, see Concurrent request limits.

Concurrency-Limit-Remaininginteger

The remaining number of the permitted concurrent requests.

For more information, see Concurrent request limits.

Response

OK
chargeDefinitionIdstringOptional
The unique ID of the product charge definition.
chargeDefinitionNumberstringOptional

The unique number (natural key) of the product charge definition.

successbooleanOptional
Indicates whether the request succeeded.

Errors

4XX
Client Request Error
500
Internal Server Error