In-App Purchase (IAP) service is an integrated in-app purchase service.
IAP offers the following features.
OS Type | Store |
---|---|
Android | Google Play |
Android | One Store (Korea Only) |
iOS | Apple App Store |
Term | Description |
---|---|
AppKey | These are terms for IAP service. |
Store | App Store, Google Play |
Payment | User purchase history |
Purchase | Item purchased in-app |
Consume | Consuming purchase before creating item for user. |
Payment Purchase Token | Verification token used when user application server consumes purchase. |
IAP service is comprised of 4 components as in following figure: IAP SDK, User Application Server, IAP Server, and Market.
Component | Description |
---|---|
IAP SDK | Register User ID and request payment for in-app purchase. If payment is performed, you’ll move to in-app purchase screen of the store (Google Store for Android). |
User Application Server | Verify purchase history requested by client via IAP server, consume purchase and transfer item. |
User Application Client | If there is no server existent to user application, perform payment consume in application’s client and grant authority for item. |
IAP Server | This is in-app purchase server provided by NHN Cloud |
Store | It includes various stores such as Google Store and Apple App Store. Store server for each platform is synchronized with IAP server. |
In-app purchase provides IAP SDK and IAP server API. The following figure is payment flow.
[Table.4 IAP Payment Flow]
Step | Description |
---|---|
[1] | Register payment user ID. Developer identifies the payment user and provides item accordingly. This is not Google Play or App Store account. [Reference] API Step Android : InternalInAppPurchase.InAppPurchase.registerUserId iOS : TIAPurchase registerUserId: error: |
[2] | Request payment in client [Reference] API Step Android : InternalInAppPurchase..InAppPurchases.requestPurchase iOS : TIAPurchase startPurchaseWithViewController: itemId: completionHandler |
[3] [3-1] |
Perform payment in store. |
[4] | Once payment is done in store, payment result will be delivered. Consume item in user application server using the result. [Warning] For Build in model, if user application server is not existent, payment consume is done directly from client. However, for security reason, we strongly recommend you to consume payment in server to server method before granting authority to item. |
[4-1] [4-2] |
Request consume to IAP Server via transferred result from the store |
[5] | Deliver item to the user if consume is successful |
[6] | Complete payment. |