{"id":818,"date":"2018-08-21T09:37:00","date_gmt":"2018-08-21T09:37:00","guid":{"rendered":"http:\/\/www.inwizards.com\/blog\/?p=818"},"modified":"2023-07-14T07:16:40","modified_gmt":"2023-07-14T07:16:40","slug":"how-does-apple-handle-in-app-purchases","status":"publish","type":"post","link":"https:\/\/www.inwizards.com\/blog\/how-does-apple-handle-in-app-purchases\/","title":{"rendered":"How does Apple handle in app purchases?"},"content":{"rendered":"<p style=\"text-align: justify;\"><b>Introduction:- <\/b> In Apple development In-app purchase is a great way to earn money from your iPhone, iPad, iPod touch, or Mac app. We can detect if some app offers an In-app purchase by going to the app page, and seeing if it has \u201cOffers IAP\u201d or \u201cIAP\u201d near the Price, Buy, or Get button. In-app purchases are mostly used to unlock some extra content in our app that we want to monetize from. Like it or not, Apple charges 30% of each successful transaction that your app will make payment.<\/p>\n<p style=\"text-align: justify;\"><b>Motivation:- <\/b>A normal version of our app with additional paid and premium features.<br \/>\nA game that offers new environments (levels) to explore.<br \/>\nAn online game allows players to purchase the virtual property (money).<\/p>\n<p style=\"text-align: justify;\"><b>But there are some more reasons for developers to implement IAP:-<\/b><\/p>\n<p style=\"text-align: justify;\"><b>Money:- <\/b> We can earn more money than just one time the price of our app! Some users are willing to spend a lot of extra content (freemium strategy).<\/p>\n<p style=\"text-align: justify;\">Market Share \/ New Business Models: We can release our app for free, which is a no-brainer download for most people \u2192 more downloads\/users reached. If users enjoy our app, they can purchase more in-app functionality.<\/p>\n<p style=\"text-align: justify;\"><b>Easy Maintenance: <\/b>We can keep adding additional content in the future for the same app, rather than having to make a new app to earn money with IAP.<\/p>\n<p style=\"text-align: justify;\"><b>Types of In-App Purchase<\/b><\/p>\n<p style=\"text-align: justify;\">1 &#8211; Consumable:- The user needs to buy any items every time he wants them. Examples of consumable purchases are buying game coins etc.<br \/>\n2 &#8211; Non-Consumable:- If the user buys an item, he will have it forever. This is a one-time purchase, and users can also transfer it between devices connected with the same Apple ID. For Example: upgrading an app with the latest version.<br \/>\n3 &#8211; non-renewing subscriptions:- Using the app content for a fixed period of time, and the user can buy it again. For example, an education season.<br \/>\n4 &#8211; Auto-renewing subscriptions:- We can subscribe to the content or the services that the app is offering for a specific period of time. It will automatically renew when the period has passed away. For Example, player subscriptions, Netflix, games, etc.<\/p>\n<p style=\"text-align: justify;\"><b>Connection Project and App Store:-<\/b><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" class=\"aligncenter wp-image-819\" src=\"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/1.png?resize=434%2C236&#038;ssl=1\" alt=\"\" width=\"434\" height=\"236\" srcset=\"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/1.png?resize=300%2C163&amp;ssl=1 300w, https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/1.png?resize=768%2C418&amp;ssl=1 768w, https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/1.png?resize=1024%2C557&amp;ssl=1 1024w, https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/1.png?w=1049&amp;ssl=1 1049w\" sizes=\"(max-width: 434px) 100vw, 434px\" data-recalc-dims=\"1\" \/><\/p>\n<p style=\"text-align: justify;\"><b>Product Configuration On iTunes :-<\/b><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" class=\"aligncenter wp-image-820\" src=\"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/2.png?resize=389%2C367&#038;ssl=1\" alt=\"\" width=\"389\" height=\"367\" srcset=\"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/2.png?resize=300%2C283&amp;ssl=1 300w, https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/2.png?w=538&amp;ssl=1 538w\" sizes=\"(max-width: 389px) 100vw, 389px\" data-recalc-dims=\"1\" \/><\/p>\n<p style=\"text-align: justify;\"><b>On the next screen, you can set up all the info about your product on iTunes:<\/b><\/p>\n<p style=\"text-align: justify;\"><b>Reference Name:<\/b> This name will be used on iTunes and in Sales and Trends reports. It won&#8217;t be displayed on the App Store and you can type any name that you want, but it can&#8217;t be longer than 64 characters.<\/p>\n<p style=\"text-align: justify;\"><b>Product ID: <\/b>A unique identifier that will be get by the app in order to recognize our product. Usually, developers use a web-reverse syntax for productID. In this example we chose com. Demo. coins. After on we&#8217;ll paste this id as a string into our code to get product info.<\/p>\n<p style=\"text-align: justify;\"><b>Price:<\/b> Choose a price from the dropdown menu on the product info page. Remember that in order to sell our in-app purchase product on the App Store, you must have applied for a Paid application agreement, Tax &amp; Banking section.<\/p>\n<p style=\"text-align: justify;\"><b>Localizations:<\/b> We&#8217;ve chosen only English, but you can add more languages by clicking on the plus button on the product info page. Then type a display name of a product and a description. Both of them will be visible on the App Store.<\/p>\n<p style=\"text-align: justify;\"><b>Screenshot:<\/b> Upload a screenshot for review by apple. It will not be displayed in the App Store and it must have a valid size given for your app platform, if your app is Universal, you may upload an iPad screenshot.<\/p>\n<p style=\"text-align: justify;\"><b>Review Notes:<\/b> Any additional information about your IAP which may be helpful for the reviewer.<\/p>\n<p style=\"text-align: justify;\"><b>Product Configuration Price &amp; Duration:-<\/b><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" class=\"aligncenter wp-image-821\" src=\"https:\/\/i0.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/3.png?resize=454%2C233&#038;ssl=1\" alt=\"\" width=\"454\" height=\"233\" srcset=\"https:\/\/i0.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/3.png?resize=300%2C154&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/3.png?resize=768%2C394&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/3.png?resize=1024%2C525&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/3.png?w=1918&amp;ssl=1 1918w, https:\/\/i0.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/3.png?w=1510&amp;ssl=1 1510w\" sizes=\"(max-width: 454px) 100vw, 454px\" data-recalc-dims=\"1\" \/><\/p>\n<p style=\"text-align: justify;\"><b>Store Kit Configuration<\/b><\/p>\n<ol style=\"text-align: justify;\">\n<li>Enable In-App Purchase in our project from the capabilities section.<\/li>\n<li>Add Store kit framework in our project.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><b>About Store Kit:-<\/b><\/p>\n<p style=\"text-align: justify;\">We will handle how to get product information into our app with product id.<\/p>\n<p style=\"text-align: justify;\">&#8211; Process of purchasing with store kit<br \/>\n&#8211; We\u2018re gonna a short look into restoring completed transactions and heading<br \/>\n&#8211; Very short: How to get receipts.<\/p>\n<p style=\"text-align: justify;\"><b>Flow Chart Payment Process:-<\/b><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" class=\"aligncenter wp-image-822\" src=\"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/4.png?resize=383%2C337&#038;ssl=1\" alt=\"\" width=\"383\" height=\"337\" srcset=\"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/4.png?resize=300%2C264&amp;ssl=1 300w, https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/4.png?resize=768%2C675&amp;ssl=1 768w, https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/4.png?w=993&amp;ssl=1 993w\" sizes=\"(max-width: 383px) 100vw, 383px\" data-recalc-dims=\"1\" \/><\/p>\n<p style=\"text-align: justify;\"><b>Store Kit Classes:- <\/b><\/p>\n<p style=\"text-align: justify;\">Implementing IAP requires the following classes of StoreKit framework:-<\/p>\n<p style=\"text-align: justify;\"><b>SKProductsRequest \u2013 <\/b>A request to StoreKit for approved products to sell (App Store). Can be configured with a number of products with the array.<br \/>\n<b>SKProductsRequestDelegate \u2013 <\/b>Declares delegate methods to handle product requests and responses with product info.<br \/>\n<b>SKProductsResponse \u2013<\/b> Sent back to the delegate from StoreKit (App Store). Contains the SKProducts object containing all the product info, that matches the product Ids sent with the request.<br \/>\n<b>SKProduct \u2013<\/b> A product retrieved from StoreKit with delegate method (that you are configured in iTunes Connect). Its Contains all information about the product, such as Product ID, Title, Description, Name, and Price.<br \/>\n<b>SKPayment \u2013<\/b> Created with a Product ID and added to the payment queue to perform a purchase and handling transaction.<br \/>\n<b>SKPaymentQueue \u2013 <\/b>A queued payment request to be sent to Apple. Notifications are triggered as a result of each payment being processed.<br \/>\n<b>SKPaymentTransaction \u2013 <\/b>Represents a completed transaction (a purchase request that has been processed by the App Store and sent back to your application via StoreKit) delegate. The transaction could be Purchased or Restored.<br \/>\n<b>SKPaymentTransactionObserver \u2013 <\/b>Custom subclass that responds to events generated by the StoreKit payment queue and manage the payment queue.<br \/>\n<b>StoreKit operations \u2013 <\/b>After a SKProductRequest is started or a SKPayment is added to the queue, our SKProductsRequestDelegate or SKPaymentTransactionObserver subclass when receives a receipt from Apple\u2019s servers.<\/p>\n<p>By &#8211; Pradeep Singh<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction:- In Apple development In-app purchase is a great way to earn money from your iPhone, iPad, iPod touch, or Mac app. We can detect if some app offers an In-app purchase by going to the app page, and seeing<\/p>\n","protected":false},"author":1,"featured_media":823,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/www.inwizards.com\/blog\/wp-content\/uploads\/2018\/08\/apple.png?fit=1280%2C500&ssl=1","_links":{"self":[{"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/posts\/818"}],"collection":[{"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/comments?post=818"}],"version-history":[{"count":5,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/posts\/818\/revisions"}],"predecessor-version":[{"id":2335,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/posts\/818\/revisions\/2335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/media\/823"}],"wp:attachment":[{"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/media?parent=818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/categories?post=818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inwizards.com\/blog\/wp-json\/wp\/v2\/tags?post=818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}