# ONE store In-App Purchase Version

### **ONE store In-App Purchase Versions** <a href="#onestoreinapppurchaseversion-onestorein-apppurchaseversions" id="onestoreinapppurchaseversion-onestorein-apppurchaseversions"></a>

* ONE store's IAP version means the API version, and in this document, two types of the IAP version are described as follows:&#x20;
  * API version : it means ONE store's In-App Purchase API version. If there is a significant change in the API, change this version. This document is created based on API V5, the latest version, which is referred to as 'API V5'.
  * SDK version : this version means In-App Purchase SDK version. It changes depending on the degree of impact of the improved contents. This document is created based on SDK V17.01.00, the latest version, which is referred to as 'SDK V17'.

    | API version | SDK version                                                             | Remarks        |
    | ----------- | ----------------------------------------------------------------------- | -------------- |
    | API V5      | <p>SDK V17.02.00<br>SDK V17.01.00</p>                                   | Latest version |
    | API V4      | <p>SDK V16.04.xx<br>SDK V16.03.xx<br>SDK V16.02.xx<br>SDK V16.01.xx</p> | <p><br></p>    |
    | API V3      | <p>SDK V15.xx.xx</p><p>.......</p>                                      | <p><br></p>    |
  * The API version is required to be specified in the AndroidManifest.xml file of a developer's applications&#x20;
  * refer to '4. Preparatory Work' > 'Set Android Manifest File (refer to ' [4. Preparatory Work' > 'Set Android Manifest File](https://dev.onestore.co.kr/wiki/en/doc/preparatory-work-1671184.html)')

### **Characteristics of ONE store In-App Purchase V5** <a href="#onestoreinapppurchaseversion-characteristicsofonestorein-apppurchasev5" id="onestoreinapppurchaseversion-characteristicsofonestorein-apppurchasev5"></a>

* Improvements made in IAP V5 (SDK V17) are as follows.

  | Item                                                                         | Improvement Details                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |   |
  | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
  | **API**                                                                      | Introduce 'Consume' concept                                                                                                           | If an item is failed to be provided, a logic is provided for recovery of the item in the app.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |   |
  | Provide support for Custom PID                                               | Developers can directly enter an In-App  ID (PID), and therefore create and manage an intuitive PID.                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |   |
  | Provide a universal IAP interface                                            | Apps which have been developed for other markets can be launched on ONE store without significant development efforts made in coding. |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |   |
  | **Billing Test Environment**                                                 | Provide separate development/commercial test environments                                                                             | ONE store's test environment is provided which is almost equal to a developer's verification environment.In the development environment of developers, development/tests can be performed by being interworked with ONE store's Sandbox. The commercial environment of developers enables billing to be made in ONE store's commercial environment. In case when the billing is made by logging in to ONE store with an ID which is registered as ONE store ID on ONE store's Developer Center, developers are allowed to freely cancel the purchase. |   |
  | Classification                                                               | Developer                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |   |
  | **Development Environment**                                                  | **Commercial Environment**                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |   |
  | ONE store                                                                    | **Sandbox**                                                                                                                           | O                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | - |
  | <p><strong>Commercial Environment</strong><br><strong>(billing)</strong></p> | -                                                                                                                                     | O                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |   |
  | **Payment Window UI**                                                        | Available to select a full payment screen, a payment pop-up screen.                                                                   | In addition to the existing full payment screen, a pop-up payment screen is newly provided. Among these two types of the payment screen, you set the screen in the app depending on the UI style you prefer.(refer to ['4. Preparatory Work' > 'Set Android Manifest File'](https://dev.onestore.co.kr/wiki/en/doc/preparatory-work-1671184.html))                                                                                                                                                                                                    |   |
  | **Interworking Method**                                                      | IAvailable to select IAP SDK, and AIDL                                                                                                | <p>Not only through the existing SDK method, you can directly interwork with the OSS by using AIDL.</p><p>However, IAP does not work in terminals without the OSS installed (refer to '<a href="https://dev.onestore.co.kr/wiki/en/doc/preparatory-work-1671184.html">4. Preparatory Work' > ' Install ONE store App</a> )</p>                                                                                                                                                                                                                        |   |
  | **Developer Center**                                                         | Improve a feature for crawling other market's app product information.                                                                | Apps which were already registered on other markets can be easily registered on ONE store.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |   |
  | Provide a feature to 'import' in-app product information from other markets. |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |   |
  | **Authentication Center**                                                    | Issue/Authenticate/Manage OAuth                                                                                                       | Data security is enhanced at the time when a developer's server and ONE store's IAP server are  interworked with each other.                                                                                                                                                                                                                                                                                                                                                                                                                          |   |

  | API V4               | API V5                                                               |
  | -------------------- | -------------------------------------------------------------------- |
  | Non-Consumable       | Managed product                                                      |
  | Consumable           |                                                                      |
  | Non-Renewable In-App | <p>One-day-pass, one-week-pass,<br>one-month-pass, one-year-pass</p> |
  | Subscription         | Subscription                                                         |
* The types of in-app products in IAP V4 and V5 change as follows. Non-Consumable and Consumable products can be implemented with managed products.
* For more details, refer to '[3. In-App Purchase Process](https://dev.onestore.co.kr/wiki/en/doc/in-app-purchase-process-1671182.html)'\ <br>

**Detailed Comparison with Key Features of Google In-App Billing**

| Function                                                                       | ONE store                                                | Google Play                                                                                                                                                                      |
| ------------------------------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Service initialization                                                         | Not provided                                             | Not provided (service binding)                                                                                                                                                   |
| Check support for in-app purchases                                             | isBillingSupported                                       | <p>isBillingSupported<br>isBillingSupportedExtraParams</p>                                                                                                                       |
| Get information about In-App product                                           | getProductDetails                                        | getSkuDetails                                                                                                                                                                    |
| In-App purchase request                                                        | <p>getPurchaseIntent<br>getPurchaseIntentExtraParams</p> | getBuyIntent                                                                                                                                                                     |
| Check if in-app products can be purchased                                      | Not provided                                             | Not provided                                                                                                                                                                     |
| Check purchase history                                                         | getPurchases                                             | <p>getPurchases : the purchases which are currently owned but not consumed<br>getPurchasesHistory : the recent purchases: including the ones expired, cancelled and consumed</p> |
| Request the 'change the subscription status'(the role differs from Google API) | manageRecurringProduct                                   | getBuyIntentToReplaceSkus                                                                                                                                                        |
| Consume the in-app product                                                     | consumePurchase                                          | consumePurchase                                                                                                                                                                  |
| Get the purchase ID                                                            | Not provided                                             | Not provided                                                                                                                                                                     |
| Service termination                                                            | Not provided                                             | Not provided (service binding)                                                                                                                                                   |
| ONE store login request                                                        | getLoginIntent                                           | Not provided                                                                                                                                                                     |

### **Migration to API V5** <a href="#onestoreinapppurchaseversion-migrationtoapiv5" id="onestoreinapppurchaseversion-migrationtoapiv5"></a>

* Once you have adopted an API V4(below SDK V16.04.00) in your app, you are not allowed to upgrade it to the API V5(SDK V17).
* You can maintain your app without applying the newest SDK, and ONE store will continuously support the billing services for the API V4.
