Happy Business Starts Here

Highlighted

Retreiving product pricing via API

Hi,

I'm looking for a way to retreive product pricing via API.  Right now I'm using a round about way of query for all the charge tiers, multiplying those with the quanitity in my code, then mutliplying the taxes and calculating the proration on my end.  I was wondering if Zuora provided an API to pull a quote for a given product.  Say I send a request with the product code, quantity, and subscription terms, and it will return back the charge components, one time, and recurring elements.

 

Thanks,

 

1 REPLY 1
Guru

Re: Retreiving product pricing via API

@DavidLai-SurfAi

 

How to do this depends on if you have the new 'Orders' capability enabled in your Zuora tenant (if you are a new customer this is default, but if you have been a customer for a while, there is a migration process).

 

If you are on Orders you can preview an order using the Order Preview API:

https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder

 

This allows you to build an entire order with rate plans quantities, etc and then have the billing engine generate line item previews for you. This is the very accurate since it uses the same calculations that invoicing would.

 

If you dont yet have Orders then you would use the Subscription Preview API:

https://www.zuora.com/developer/api-reference/#operation/POST_PreviewSubscription