I'm currently developing a Phonegap mobile application.
I implemented In App purchase in my iPhone application and it works fine.
I retrieve my products informations from itunes, I got the receipt of payment from itunes store, my app is sending the receipt back to my servers, the receipt is verified server side using curl/apple api.
My issue is, on the server side when I log the purchase when receipt is OK using information of the receipt, so I know which product the user bought through the app, the datetime, the transaction id BUT I don't know how much the user paid for it. The same product is on different itunes store (US, FR, UK..), so the price could be 100E or 140$, but on the server side how can I retrieve the price and currency the user paid (to make statistics for example)?
I don't think allow you to see the local purchase price.
Not really code related in that you select a purchase level and apple provides a chart in Itunesconnect to see what payment they take across a range of currencies .
Related
I have recently submitted my app in Appstore with in-app-purchase feature,
it is work fine in live server but, some customer pay the payment in my IOS app not updated his profile in my server database,
Can i get User Payment details in my iTunes account on developer side for checking payment based on orderID.
If it is possible where i can get details in iTunes account or any other possibility.
Thanks for your help.
It's not possible to get any sales related data for us developers, like Apple ID, form of payment, Credit Card details etc.
Please clarify, what you want to do exactly.
The only thing you can do it "Receipt Validation", from within the app: https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Introduction.html
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 ?
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.
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.
I'm considering posting an app to the iphone app store, but I'm curious before I start paying them for the priviledge of posting the app, whether they provide instant payment notification to a url?
Generally, I've used paypal in the past for applications where right after payment my web site is secretly notified of a purchase. I take this notification, with the users email address and product purchased, to send the purchaser information required for the application.
Is this possible with apple? With the iphone app store? What about the upcoming mac store?
thx
No. Apple handles all contact with the customer, including delivery of the app. At the end of each day, week and month they give you summaries of sales of each product in each country. It's nothing like selling with PayPal. The iOS and Mac App Store are exactly the same in this regard.
The nearest you can get is having your app connect to your server when it first runs, although if you're doing this for no other reason than to track your users, you'll have to check it's allowed under the developer agreement.
First, no, you do not receive instant notification. You can grab a daily report on the web the following early morning (in the US), you can use the free app that Apple provides to retrieve the information, or you can use a variety of third-party tools to do the same.
Second, you will never receive any information whatsoever about the people who buy your app, so no, you can't send purchasers anything.
The Mac App Store appears to use the exact same arrangements.
If you use in-app purchase, you can get an instant notification to your server for the in-app purchase, but not for the initial download of the app.
If you just place a paid app in Apple's App store, you get no direct sales or customer information of any kind, only after-the-fact daily and weekly sales trend estimates, and monthly sales reports a few weeks later. Then Apple then pays you 70% of what they reported up to 45 days after the monthly close. You don't pay them. They pay you. And with over 300K apps in their store, and no other store doing anywhere near as well, they need no privileges granted from any developer. It's more like take it or leave it.
I am making an in-app purchase application for bulk of quizzes. I have all the information, graphics and data set of quizzes on my server. I want user to purchase quizzes with in-app purchase and want to transfer all the related content of purchased item from my server to application.
Now, apple is asking me to submit binary while adding in-app purchase item. Is this compulsory? For all kind of products (Consumable, Nonconsumable & Subscriptions)?
What if I want to manage the contents(graphics, database for that quiz product) of the product on my server not on itunes connect?
Help would be appreciated.
Thanks.
You don't have to submit binaries. In fact, it's not even possible. In-app purchases only have a product ID, a description and a price.
Also, be aware that you can't send new application code to the device via your web server. Only data can be sent.
I have a website which sells a product to the user (downloadable). I am creating an iPhone app and want to be able to sell some of the products using the 3.0's in-app purchase.
Now the documentation mentions that anything you want to sell has to be uploaded to iTunes Connect and approved by Apple. But I want to be able to keep adding products to be sold by my app on a daily basis.
I have a web service to get the list of products from the website. Is it possible to include in-app purchase to let user buy this stuff from within the app but without having to add them to iTunes Connect?
As I understand it, no - all the things you want to sell via in-app purchase run through a vetting process similar to that of the apps themselves. Apple won't allow, for example, a "photo of the day" application if you can in-app purchase pornographic photos to be sent to you daily.
What you could probably do is submit your app with a backlog of in-app purchases, five or six days ahead of time, then consistently be submitting your daily items ahead of when you want them to be available. Not sure how reliable the review process is, or whether this will work for your situation - just a thought.
Nekin,
I think you have to use the type as consumable (in app purchase) product as each time the product has to be purchased. Once you purchase a book, then you can mark it as purchased in your local app database and that way the user need not buy the same book as you can check it in the local app database before connecting to the in app purchase payment request and this way the inapp purchase products can be dynamic and can use as many books but the list of books should be from your server.
You can keep updating the server data with more number of books.
Thanks,
Vijay