Pricing API

Retrieve, localize and calculate prices on the fly

Our existing Localized Prices API for 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 a more advanced usage, use this Pricing API:

  • Easier batch price lookup: retrieve the prices of many 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
  • No more coupon calculations: pass the coupon code and the price will automatically take it into account (this applies to one-time purchase products only)
  • On the server side: 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 subscriptions: 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.
  • customer_country - A two character country code (eg. GB) for localised pricing.
  • 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 (currently unsupported with subscriptions).

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.
Was this page helpful?