Before you begin

Before retrieving your price points for the checkout, ensure that you’ve set up your price points in the Publisher Dashboard.

Retrieve price points

To retrieve your price points, call the following function:

CheckoutController.Instance.GetPricePoints();

This function triggers the OnPricePointsSuccess callback upon success. The callback receives a PricePointsModel object containing the following properties:

Property NameTypeDescription
pricingPointsArrayList of available price points.
pricingPointDataObjectCurrency formatting metadata.

pricingPoints:

basePriceInUSDstringThe product’s base price in USD.
localizedPricestringThe product’s price in the local currency, adjusted by the multiplier.
formattedPricestringThe localized price in string format.

pricingPointData:

currencyCodestringThe ISO 4217 currency code. For example, USD for United States Dollar.
currencySymbolstringThe symbol representing the currency. For example, ”$”.
fractionalSeparatorstringThe character used to separate decimal places . For example, ”.” or ”,”.
milSeparatorstringThe character used to separate thousands. For example, ”,” or ”.”.
symbolPositionstringThe position of the currency symbol. For example, “Right” for after the amount, “Left” for before.
spacingbooleanWhether there is a space between the number and the currency symbol.
multipliernumberThe factor by which the localizedPrice is multiplied. In the example below, the localized price is 200 and the multiplier is 100, so the final price will be $2.00.

Example code

Below is an example response code for the function:

{
    "pricingPoints": [
        {
            "basePriceInUSD": "200",
            "localizedPrice": "200",
            "formattedPrice": "$2.00"
        },
        {
            "basePriceInUSD": "500",
            "localizedPrice": "500",
            "formattedPrice": "$5.00"
        }
    ],
    "pricingPointData": {
        "currencyCode": "USD",
        "currencySymbol": "$",
        "fractionalSeparator": ".",
        "milSeparator": ",",
        "symbolPosition": "Left",
        "spacing": true,
        "multiplier": 100
    }
}