Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

How to obtain introductory price from store?
Started by erick.spiegel89 Jun 13 2018 10:55 AM

2 replies to this topic
introductory price in-app purchases
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 6 posts
  • Corona SDK

Im trying to obtain the introductory price from an in-app, but the store library only provides me the following data with store.loadProducts() function


    id = "com.company.appName.inappId",
    localizedPrice = "$ 5.99",
    price = 5.9900000000000002,
    priceLocale = "USD",
    productIdentifier = "com.company.appName.inappId",
    type = "subscription"
In the store I have the in-app "com.company.appName.inappId" with $ 5.99 price and this in-app contains an introductory price by $0.99 the first month
How can i access the introductory price localized by each country?
Corona info:
Version 2018.3268 (2018.4.16)

[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,801 posts
  • Enterprise

Is this on iOS, Google Play or Amazon?


Google seems to cache values for store.loadProducts(). Apple may as well. You might be hitting that caching issue.



[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 6 posts
  • Corona SDK

It is for iOS. Itunes Connect has a section where you can add an introductory price that is different from the main price in the inapp Attached File  introductory prices.png   160.29KB   0 downloads. I will try to explain with the following example.


iTunes connect info:

Monthly plan for an inapp "com.myCompany.InappID" that cost $7.99 with a introductory price for the first month with cost $0.99.


then I use the following code for my app:

local function storeListener(event)

store.loadProducts({"com.myCompany.InappID"}, storeListener)

console log:
   event = {
        invalidProducts = {},
        name = "productList",
   products = {
       description = "Unlimited content access",
       localizedPrice = "USD$7.99.00",
       price = 7.9999,
       priceLocale = "USD",
       productIdentifier = "com.myCompany.InappID",
       title = "Monthly Subscription Deal"

The information never contains the introductory price and the documentation for the store library doesn't have that info, so I need this data from the store so i can show it in my app.


I hope this is information makes it clearer