Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Price of iphone in-app purchase, server-side

How can a server determine the amount of an iphone in-app purchase ?

The server receives the purchase's receipt sent by the app and uses this to validate it.

This returns some informations like a transaction_id, product_id, etc; but no amount or user details.

Since the amount depends on the currency and the user's country, how can I get the amount of the purchase on the server ?

like image 941
Arnaud Le Blanc Avatar asked Jul 17 '12 14:07

Arnaud Le Blanc


People also ask

How much is Apple in-app purchase?

But Apple will still charge a 30% fee for in-app purchases for top grossing apps, meaning the impact to Apple's financials could be minimal. In addition, the maximum discount for each publisher is capped, because the commission goes back to 30% after sales after Apple's fees cross $1 million.

How much does in-app purchases cost?

The average purchase amount is $12.77 on iOS, $6.19 on Android and $8.80 overall. 7.1% of iOS users make at least one payment per month; 4.6% of Android users do. Asian users spend a monthly average of $0.70 per user per app; Latin Americans spend the least, at $0.16.

Are in-app purchases on iPhone free?

iPhone owners can now purchase extra content through free iPhone apps, whereas before in-app purchasing was only available in apps that cost money. Apple on Thursday sent e-mails to developers stating in-app purchases are now permitted in free apps.

Do I need a server for in-app purchases?

It should be noted that server validation isn't mandatory — in-app purchases will still work without it. It grants some advantages, though: Advanced payment analytics, which is especially important for subscriptions since everything that happens after the activation isn't processed by the device.


2 Answers

From the same document, you can get product details localized through the SKProduct class, check this

If you are asking about how do the server knows it, when you setup an in-app purchase on the server you choose the price as tier, each tier has the price in different currencies so when you send the in-app purchase product id in the request, it check its price you setup and reflects it in the corresponding currency.

For device locale, check this and for device language check this but to get it from the server itself, Apple doesn't provide an API for it.

like image 177
XIII Avatar answered Oct 12 '22 06:10

XIII


Now it is possible to set a different price for each country so the mapping of in app purchase to a pricing tier can be cumbersome.

You can get the price as the user see it in the UI and the price locale from the client and then send that information to your server.

For renewals - You can see renewals by verifying the receipt data on the server side and use the price sent by the client in the first transaction.

like image 32
little Avatar answered Oct 12 '22 04:10

little