API to get Price of a auto renewable product

Does Apple provide an API to get pricing info of a product, configured under inapp purchase feature. (for auto renewable subscription)

Is the same API that for the other kind of In App Purchases.

In the function:


func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse)


You get the products from the response and each product has a property called priceLocale

Then you use a NumberFormatter to display it:


        let numberFormatter = NumberFormatter()
        let locale = product.priceLocale
        numberFormatter.numberStyle = .currency
        numberFormatter.locale = locale
        guard let localizedPrice = numberFormatter.string(from:  product.price) else { fatalError("Can not get localizedPrice")}
        print("localizedPrice: ", localizedPrice)

Hi Manuel,

Thanks for the reply.


If I am not wrong, this is the API which can be used using StoreKit inside the App in iOS sandbox environment.


But I am looking for an API which can be called from a server rather than the iOS App environment. Can we access the same API from outside (a server)?

Yes, this Api is for sandbox and production environments.


You could also look up from a server like this:


h ttp://itunes.apple.com/lookup?id=288113403


And you also can use App store Promotions.


App Store Connect > Your App > Features > App Store Promotions


You can promote up to 20 in-app purchases, and they’ll appear on your app’s product page and can be shown in search results or be featured by our editorial team.


Users can tap an in-app purchase to open your app, where they can buy it.


So I think that the results will be available with the same Api.

h ttp://itunes.apple.com/lookup?id=288113403

This link will only tell the price of paid apps, not for the freemium apps.

I am looking for an API which can tell you the price of Inapp purchase items of an app. Which we configure under the subscription Group.


Here is a document of how we set prices, I am looking for an API, which can tell me these configured prices when queried.

ht tps://help.apple.com/app-store-connect/#/devc9870599e


Please let me know if I am not clear.

Hi ManuelMB,


Any more insight on this.

HI Guys.


Any ideas how to get the price and the currency of the auto renewable subscription purchase from server ?There is no such information in the subscriptions receipt .

HI,

We still cannot get the prices of the in App Purchase for each country from the appstoreconnect v1?

It would really suit us developers.

Thanks

Any updates on that?

Any update on that? I genuinely cannot understand that how there's no price info is supported with getting transaction history.

I think Apple doesn’t provide pricing info because of privacy issue. For example user’s Region can be leaked.

But you can submit price and currency while you verify purchases from user’s device, as an option.

Another interesting thing when user upgrades or downgrades existing subscription, then you need to calculate pro rate values, which is extra developer’s obligation.

I hope #Apple will provide some solution to get price info in transaction details (how much apple charged user) in a gently way. It definitely minimizes developer’s efforts and potential issues.

Thanks.

Just For Privacy sake, I think Apple is not thinking it thorough for developer enough.

Atleast provide some unique way to identify a user.

Like when they are receiving premium receipt. Provide user the original_transaction_id also.

For upgrade/downgrade/crossgrade/cancel downgrade. Right now, developer need to depend on the notification but that is not enough.

You need the data of each country and currency for that particular product id in the subscription plan. Now for each user maintain their first payment currency and product_id they bought the plan. Then when they change the plan, check the new autoRenewProductId in case of downgrade and crossgrade. Ultimately, anytime when there's a DID_CHANGE_RENEWAL_PREF involved. we need to maintain 2 history and accordingly change user validity or renewal date and might need to calculate the prorated refund in case of UPGRADE and CROSSGRADE.

also check this: https://www.revenuecat.com/blog/engineering/ios-subscription-groups-explained/

API to get Price of a auto renewable product
 
 
Q