Last updated

Pricing API Overview

The Pricing API enables you to simulate billing outcomes for one or more products before creating or updating an account’s subscriptions. This is useful for generating quotes, estimating costs, and validating billing logic using existing rate and pricing configurations.

Use Cases

  • Quoting charges before committing account product changes
  • Validating billing impact of product additions or updates
  • Predicting subscription cycles, charges, and credits
  • Simulating contract, rate class, and currency overrides

How It Works

You send a request to the API with product details, optional account context, and configuration parameters. The API responds with a detailed breakdown of predicted charges, credits, subscription periods, and calculated totals.

Request Format

The API request must provide key information related to the existing product(s) and related rating/account information.

FieldTypeDescription
ProductsArrayList of products to quote
ProductId or ProductObjNumber / ObjectRequired unless AccountProduct is provided
AccountId or AccountObjNumber / ObjectOptional; used to derive currency, billing cycle
AccountProductId or AccountProductObjNumber / ObjectOptional; required when quoting updates to existing subscriptions
ContractId or ContractObjNumber / ObjectOptional; defines pricing context when multiple contracts exist
RateClassId or RateClassObjNumber / ObjectOptional; for quoting with a specific rate class
QuantityNumberRequired product quantity
StartDate, RenewalStartDate, EndDateDate (YYYY-MM-DD)Define the subscription’s timeline
CurrencyCodeTextOptional if Account is provided
RateOverrideNumberOptional; overrides all rates in the calculation
AttributesObject or ArrayOptional for formula-based or filtered pricing logic

You may use object lookups (ProductObj, AccountObj, etc.) instead of IDs if referencing external systems.

Sample Request (JSON)

{
  "Products": [
    {
      "ProductObj": { "Name": "Premium Hosting" },
      "AccountObj": { "Name": "Acme Corp" },
      "Quantity": 2,
      "StartDate": "2025-06-01",
      "EndDate": "2025-12-31",
      "CurrencyCode": "USD"
    }
  ]
}

Response Format

The API returns predicted charges, credits, totals, and other details per product.

FieldTypeDescription
ProductsArrayList of calculated results
ProductId, ProductNameNumber, TextIdentifiers for the quoted product
RatingMethodTypeTextRating method used
FirstCycleCost, LastCycleCost, TotalCostNumberCycle-based and total cost calculations
ChargesArrayDetailed charges per cycle
CreditsArrayPredicted credits
ErrorTextIf any issues occurred during calculation

Sample Charge Output

FieldDescription
ActivityDateDate of the charge
Quantity, Rate, CostBilling details per cycle
ContractId, RateClassIdContext used for pricing
SubscriptionStartDate, SubscriptionEndDateCalculated cycle dates

Billing Cycle Logic

The API supports the following billing cycle behaviors:

  • Start Date Syncing – Charges start from the specified StartDate, optionally aligned with RenewalStartDate.
  • Account-Based Syncing – If Account is provided, its billing cycle determines the charge periods.

Note: The API does not support mismatched billing cycles (e.g., quoting an annual product for a predicted monthly account).

Rate Resolution Priority

The system uses the following logic to determine applicable rates (in order of priority):

  1. RateOverride (if provided)
  2. Rates on the specified AccountProduct
  3. Rates from Contract (or its RateClass)
  4. Rates from explicitly provided RateClass
  5. Default rate hierarchy on Account and its parents

Limitations

  • Packages & Package Products: Not supported in this version
  • Mismatched Billing Cycles: Unsupported for predicted (non-existent) accounts