POST /v1/product-charge-definitions

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.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Content-Encoding String No

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-Id String No

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

Authorization String No

The value is in the Bearer {token} format where {token} is a valid OAuth token generated by calling Create an OAuth token.

Idempotency-Key String No

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.

Zuora-Entity-Ids String No

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 do not need to set this header.

Accept-Encoding String No

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.

Request body fields

Name Type Required Description
defaultQuantity Number No

The default quantity.

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

billingPeriod String No

The billing period for the product charge definition.

prices[] Array No

Container for the prices of the product charge definition.

prices[].price Number No

The price of this item.

This field is only applicable for charges based on the following charge models:

  • Flat Fee
  • Per Unit
  • Delivery Pricing
prices[].tiers[] Array No

Container for the tiers of the price item.

This field is only applicable for charges based on the following charge models:

  • Tiered Pricing
  • Volume Pricing

You must specify all relevant fields of all tiers, including pricing information for each currency. For each currency, ensure that the tiers appear in ascending order of StartingUnit.

For example:

[
  {
    "startingUnit": "1",
    "endingUnit": "150",
    "currency": "USD",
    "price": 1.95,
    "priceFormat": "Per Unit"
  },
  {
    "startingUnit": "151",
    "endingUnit": "300",
    "currency": "USD",
    "price": 1.45,
    "priceFormat": "Per Unit"
  },
  {
    "startingUnit": "1",
    "endingUnit": "150",
    "currency": "EUR",
    "price": 1.75,
    "priceFormat": "Per Unit"
  },
  {
    "startingUnit": "151",
    "endingUnit": "300",
    "currency": "EUR",
    "price": 1.30,
    "priceFormat": "Per Unit"
  }
]
prices[].discountPercentage Number No

The percentage of discount for a percentage discount. The field is applicable only for charges based on the Discount-Percentage charge model.

prices[].currency String No

The currency for the price.

prices[].discountAmount Number No

The specific amount for a fixed discount. The field is applicable only for charges based on the Discount-Fixed Amount charge model.

uom String No

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

chargeModel String No

Determines how to calculate charges. Charge models must be individually activated in Zuora Billing administration.

Possible values:

  • "FlatFee"
  • "Volume"
  • "DiscountPercentage"
  • "PerUnit"
  • "Tiered"
  • "Delivery"
  • "DiscountFixedAmount"
listPriceBase String No

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.

Possible values:

  • "Per_Billing_Period"
  • "Per_Year"
  • "Per_Month"
  • "Per_Week"
effectiveStartDate String No

The effective start date of the product charge definition.

specificListPriceBase Integer No

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.

specificBillingPeriod Number No

The specific number of billing periods for the product charge definition.

productRatePlanChargeNumber String No

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

effectiveEndDate String No

The effective end date of the product charge definition.

termType String No

The type of the subscription that is eligible for this charge definition.

Possible values:

  • null
  • "EVERGREEN"
  • "TERMED"
term Number No

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.

billingTiming String No

The billing timing setting for the product charge definition.

Possible values:

  • "IN_ARREARS"
  • "IN_ADVANCE"
taxCode String No

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.

productRatePlanChargeId String No

The unique ID of the charge of the charge definition.

taxMode String No

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.

Possible values:

  • null
  • "TaxExclusive"
  • "TaxInclusive"
taxable Boolean No

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.

termPeriodType String No

Specifies the period type for the subscription term that is eligible for this charge definition.

Possible values:

  • "Week"
  • null
  • "Day"
  • "Year"
  • "Month"
productRatePlanId String No

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

productRatePlanNumber String No

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.