Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and plans and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "Gold" product that has prices for $100/month, $1000/year, and $50 once.
Creates a new price.
Price price = zuoraClient.prices().create(params);
Parameter | Type | Tags | Description |
---|---|---|---|
params |
PriceCreateRequest |
Required | Price request object. |
PriceCreateRequest params = PriceCreateRequest.priceBuilder()
.name("Monthly Membership")
.accountingCode(defaultAccountingCodeName)
.startEvent(PriceEnum.Event.CONTRACT_EFFECTIVE)
.alignment(PriceEnum.Alignment.SUBSCRIPTION_PLAN_ITEM)
.interval(PriceEnum.Interval.MONTH)
.on(PriceEnum.RecurringOn.ACCOUNT_CYCLE_DATE)
.build();
Price price = zuoraClient.prices().create(params);
Price price = zuoraClient.prices().get(priceId);
Parameter | Type | Tags | Description |
---|---|---|---|
id |
String |
Required | The unique identifier of a price. |
String PRICE_ID = "price_id8";
Price price = zuoraClient.prices().get(PRICE_ID);
Price price = zuoraClient.prices().update(price);
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Price |
Required | Price object. |
String PRICE_ID = "price_id8";
Price price = zuoraClient.prices().get(PRICE_ID);
price.setName("Price B")
Price price = zuoraClient.prices().update(price);