Displaying Localized Prices

One of the many benefits to using Paddle is its ability to automatically localize your checkout with geo-specific payment options, manage VAT/sales tax calculations and show pricing in the user’s local currency.

For continuity, Paddle provides a way to dynamically localize the prices displayed on your site to match those displayed on the checkout once opened.

Paddle.js supports two different methods of displaying local prices on your site, the first is to wrap any amounts in a HTML class, in the example below, the $59 price would be localized:

preparing...

For example, if you have pricing enabled in Euros (€54) and British Pounds (£45) for the product, users would see the following:

  • A user from the US would see: "Grab your copy of My Product for just US$59!"
  • A user from the UK would see: "Grab your copy of My Product for just £45!"
  • A user from Germany would see: "Grab your copy of My Product for just €54!"

In addition to paddle-gross for the full product price, including tax, you can also use paddle-tax for the taxable amount of the sale, and paddle-net for the pre-tax price of the product.

If you wish to use the pricing information elsewhere you can pull an object of localized pricing information for the current user for a specified product using the Paddle.Product.Prices(productId, callback) method. Using this method also enables you to retrieve additional data if your product is recurring in nature, including trial periods, localized recurring pricing and billing periods.

preparing...

The Paddle.Product.Prices() method performs an asynchronous call to our 1.0 Pricing API to pull pricing information. It accepts three arguments: the first productId is the ID of the Paddle Product to pull pricing for, the second quantity is the number of items, and the third callback is a Javascript function to call upon successfully retrieving prices from our API.

The callback will be passed an object of price information as follows:

price
object

Price values are returned including a currency symbol

gross
string

Total product price amount, including tax.

Example:
US$70.00
net
string

Pre-tax product price amount.

Example:
US$58.33
tax
string

Taxable product price amount.

Example:
US$11.67
tax_included
boolean

Is the product price amount tax inclusive or exclusive.

quantity
integer

The product quantity the price is based on.Show all...

>= 1<= 100
Default:
1
country
string

A two-letter ISO country code. See supported countries.

Example:
GB
Match pattern:
[A-Z]{2}
recurring
object

Included only for subscription products

price
object
subscription
object

To retrieve price data for a list of products in a single call, or to apply a discount coupon in the pricing API call, you may call our 2.0 Pricing API.

Note that, if calling from front-end code, you should use the JSONP data type in order to make this cross-domain request: