Build pricing pages using the price preview operation
Get localized prices for a country, including taxes and discount calculation using the new preview prices operation. Paddle returns formatted prices, including currency symbol, so you can pass straight to your frontend.
What's new?
We added the preview prices operation to the Paddle API. You can use it to get localized prices for a list of items, typically when building pricing pages.
How it works
When customers make a purchase, Paddle Checkout automatically shows the correct prices for a customer based on their location. Customers see prices in their local currency, with taxes estimated for their country or region.
You can display localized prices on your website using the same calculations as Paddle Checkout using the preview prices operation. This means the customer sees the same information on your pricing page as when they open checkout to subscribe.
To preview prices, send a list of items along with location information to the /price-preview
endpoint. Paddle responds with localized prices, including totals formatted for the currency and region.
What about transaction preview?
We previously recommended using the preview a transaction operation to build pricing pages. We now recommend using the preview prices operation in most cases.
Preview prices
- Recommended for most pricing pages. Simply returns calculated totals for prices.
- Returns item totals formatted for the currency and region, including currency code.
- Response only includes calculations for each item included in the request.
- You can send prices with different billing periods and trial periods.
Learn more: preview prices operation
Preview a transaction
- Recommended for more advanced pricing pages where users can build their own plans.
- Returns item totals in the lowest denomination for a currency (e.g. cents for USD).
- Response includes calculations for line items included in the request, and overall totals for all items.
- Requests are similar to creating a transaction, so billing periods and trial periods must match for all prices.
Learn more: preview a transaction operation
The preview a transaction operation is not deprecated. We recommend it for more advanced pricing pages, with cart-like functionality where users build their own plans.
Next steps
This change is available in version 1
of the Paddle API.
It's a non-breaking change, meaning it doesn't impact existing integrations.
Check out our build a pricing page tutorial to get started.