Product Pricing

The Pricing API provides advanced features for retrieving, localizing and calculating product prices on demand.

Our existing Localized Prices in Paddle.js already allows you to dynamically display a localized price on your page. This helps you avoid hardcoding prices, or showing the wrong currency to a user, which would hurt conversion. This is a useful, but fairly simplistic solution. For advanced usage, the Pricing API allows for:

  • Easier batch price lookup: retrieve the prices of multiple products (for example your whole store page) in one single API call
  • Effortless custom localization: rather than letting us decide which price to return, pass the visitor IP or country code you want us to localize
  • Display original and discounted price: retrieve both the discounted price as well as the original price when your product has an active sale discount (one-time purchase products only)
  • No more coupon calculations: pass the coupon code and the price will automatically take it into account (one-time purchase products only)
  • Server-side configuration: our Pricing API allows you to run these calls server side, which allows for greater control and flexibility than Paddle.js allows on the client side
  • For one-off and subscription products: all business models are supported

Method: GET Endpoint: https://checkout.paddle.com/api/2.0/prices

Fields:

  • product_ids - A comma-separated list of product (or subscription plan) IDs to return prices for. Please note that the product needs to be fully set-up in the dashboard (checkout link is available); Failing to do so will result in the API not returning the product prices.
  • customer_country - A two character ISO country code (eg. GB) for localised pricing. Please see the Checkout Parameters documentation for accepted country code values.
  • customer_ip - An IP address of the customer to return pricing for.
  • coupons - A comma separated list of coupon codes to apply to the product prices (one-time purchase products only).

Examples

Request - Single Product

https://checkout.paddle.com/api/2.0/prices?product_ids=123456&customer_country=GB

Response


{
    "success": true,
    "response": {
        "customer_country": "GB",
        "products": [
            {
                "product_id": 123456,
                "product_title": "My Product 3",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "list_price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "applied_coupon": []
            }
        ]
    }
}

Request - Multiple Products

https://checkout.paddle.com/api/2.0/prices?product_ids=12345,678910,111213&customer_country=GB

Response


{
    "success": true,
    "response": {
        "customer_country": "GB",
        "products": [
            {
                "product_id": 123456,
                "product_title": "My Product 3",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "list_price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "applied_coupon": []
            },
            {
                "product_id": 23456,
                "product_title": "My Product 2",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 17.95,
                    "net": 14.96,
                    "tax": 2.99
                },
                "list_price": {
                    "gross": 17.95,
                    "net": 14.96,
                    "tax": 2.99
                },
                "applied_coupon": []
            },
            {
                "product_id": 34567,
                "product_title": "My Product 3",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "list_price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "applied_coupon": []
            }
        ]
    }
}

Request - Multiple Products with Coupon(s)

https://checkout.paddle.com/api/2.0/prices?product_ids=12345,678910,111213&customer_country=GB&coupons=COUPONOFF,COUPONOFF2

Response


{
    "success": true,
    "response": {
        "customer_country": "GB",
        "products": [
            {
                "product_id": 12345,
                "product_title": "My Product 3",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 17.48,
                    "net": 14.56,
                    "tax": 2.91
                },
                "list_price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "applied_coupon": {
                    "code": "COUPONOFF2",
                    "discount": 17.475
                }
            },
            {
                "product_id": 23456,
                "product_title": "My Product 2",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 14.36,
                    "net": 11.97,
                    "tax": 2.39
                },
                "list_price": {
                    "gross": 17.95,
                    "net": 14.96,
                    "tax": 2.99
                },
                "applied_coupon": {
                    "code": "COUPONOFF",
                    "discount": 3.59
                }
            },
            {
                "product_id": 34567,
                "product_title": "My Product 3",
                "currency": "GBP",
                "vendor_set_prices_included_tax": true,
                "price": {
                    "gross": 27.96,
                    "net": 23.3,
                    "tax": 4.66
                },
                "list_price": {
                    "gross": 34.95,
                    "net": 29.13,
                    "tax": 5.83
                },
                "applied_coupon": {
                    "code": "COUPONOFF",
                    "discount": 6.99
                }
            }
        ]
    }
}

Notes:

  • If more than one coupon is specified, Paddle will calculate the price of each product on the basis of the coupon that provides the greatest discount.
  • If the one-time purchase product has an active sale discount, the sale price will be reflected in the price; list-price will contain the original price of the product.

Questions about Paddle?

If you need any help regarding your Paddle integration, please get in touch with our Customer Success team using the form below.