Samsung In-App Purchase (IAP) supports your app IAP-integration and in-app item development testing of in-app item offering, purchase, and payment functionality before you submit your apps and in-app items (consumable, nonconsumable, and subscription) to validation testing and normal publication in Galaxy Store.
IAP testing of in-app item offerings (when your app gets and presents current item prices and details to app users) is the same as for normal publication. IAP testing of in-app item purchase and payment is the same as for normal publication except for subscription item testing changes, and some testers get items for free.
2. IAP Test Environment
Determine the IAP tests and type of purchase and payment transactions to test items with.
In your app code, set the IAP operating mode indicated below.
In the Seller Portal: register your app and in-app items, set up closed beta testing (if used), and set the app status indicated below.
CautionDo not test when the IAP operating mode is ‘OPERATION_MODE_PRODUCTION’ and the app status is ‘Registering’. IAP functionality is not supported under these conditions.
IAP Test Transaction Types
IAP testing supports ‘no charge’ and ‘charge’ transactions for item purchases.
(1) No charge transactions
Item payments are not reported to the payment gateway (PG card company or payment agency). For successful transactions, Purchase emails, with amounts, are sent to testers.
In the item purchase UI popup, the ‘Sandbox’ icon is displayed.
Details depend on the IAP test environment and type of tester:
For non-consumable items, the purchase record is initialized every 10 minutes to allow repurchase.
For subscription items, the subscription cycle is automatically renewed every 10 minutes and the subscription is automatically canceled after 12 renewals.
OPERATION_MODE_TEST_FAILURE
All types
Testers never get purchased items. - IAP always reports failed purchases.
OPERATION_MODE_PRODUCTION
All types
For successful purchases, testers get items. - IAP reports success.
(2) Charge transactions
For successful transactions, item payments are reported to and authorized by the payment gateway (PG card company or payment agency), and IAP reports purchase amounts.
In the item purchase UI popup, the ‘Sandbox’ icon is not displayed.
Only occur for OPERATION_MODE_PRODUCTION beta tests and non-licensed testers :
For successful purchases, testers get items and are charged, and IAP reports successful purchases.
3. IAP Testing
When creating tests of your app, in-app items, and Samsung IAP, the IAP tests are guidelines for test setup and initiating and verifying IAP functionality. You can test your app and in-app items with one or more IAP tests.
3.1 Preparation
For all IAP tests, prepare your testers, app, and in-app items:
Ensure each tester has a valid credit card for payment.
Side load tester and licensed tester credit cards are not billed for any item purchases.
Non-licensed tester credit cards are billed for all item purchases.
In your app code:
a. Set the IAP operating mode for the selected IAP test. mIapHelper.setOperationMode(HelperDefine.OperationMode.[IAP operating mode for the selected test])
b. Set whether or not payment-complete or -failed messages are to be displayed during item purchasing IapHelper.startPayment class parameter _showSuccessDialog is true or false
Install the app on a test device by an independent method (such as side loading).
Test item offering and purchase:
a. Testers always get purchased items and are not charged.
b. IAP reports all purchases as successful and the purchase amounts.
Test offerings and failed purchases and payments of all items.
Commonly used during app, in-app item, and IAP integration development.
Prepare the app and in-app items for testing.
IAP operating mode is set to OPERATION_MODE_TEST_FAILURE.
Install the app on a test device by an independent method (such as side loading).
Test item offering and purchase:
a. Testers always do not get items and are not charged.
b. IAP reports all item purchases and payments as failed.
(3) Production Closed Beta Test
Caution
Apps deployed for beta testing must only be installed using the beta testing URL. If sideloaded, item information is not accessible.
If the beta test app is updated and a newer version is deployed, testers MUST delete the earlier beta test app from their device and re-install the app.
Purpose and use:
All beta testers can test offerings, and successful and failed purchases and payments of all items (consumable, nonconsumable, and subscription).
Commonly used to test initial versions and update versions of apps and their items as a last development phase before normal publication.
NoteThe following steps are used for beta test setup and testing to be performed by the same person. Typically, a beta test conductor sets up a beta test to be run by many beta testers.
If the app was previously side loaded onto the test device, uninstall the app.
b. Set up the closed beta test:
In the Binary tab of the Seller Portal app registration, register all testers (non-licensed and licensed) and the feedback channel for the closed beta test.
In your Seller Portal profile, register the licensed testers.
c. Submit the app and its items for beta release by clicking Submit Beta Test.
For more details, see the App Registration Guide.
4. On each beta tester’s device, download the beta app from a beta test URL.
5. Test item offering and purchase:
Typically, some testers are non-licensed and some are licensed.
Non-licensed testers can get purchased items and are charged. Registered item periods apply to subscription items.
Licensed testers can get purchased items and are not charged. IAP test periods apply to subscription items.
IAP reports successful and failed transactions, and actual item purchase amounts for successful transactions.
The following steps can be run for each tested in-app item:
Test in-app item offering:
a. In the app, initiate the display of the current price and details for each item.
b. Verify that item information matches the price and details registered in Seller Portal.
Test in-app item purchase:
a. In the app, initiate the purchase of an in item.
b. For licensed testers, click OK.
c. For Always Successful Side Load and Always Fail Side Load testers, click CONTINUE.
d. In the purchase popup:
No Charge transactions Charge transactions
(1) Verify the item details match those registered in Seller Portal.
NoteItem coupons, free trial periods, lower-tier prices, and auto payment due dates are displayed but do not apply during IAP testing.
(2) Select payment method and verify payment information is correct.
(3) Select ‘Point and coupons’ and verify displayed information is correct.
(4) Click the [item purchase button].
e. Verify the following:
NoteIAP test preparation sets whether or not payment-complete or payment-failed messages are displayed.
For successful purchases: - A payment-complete message is displayed (when configured). - The purchase item is added to your account. - An item purchased email is sent to you. - If you are a non-licensed tester, you are charged. - If you are a licensed tester, you are not charged. For failed purchased: - A payment-failed message is displayed (when configured). - The purchase item is not added to your account. - You are not charged.
3.4 Testing Subscription Items
For Auto-Recurring Subscription (ARS) items, you can test their offering, purchase, free trials, lower and regular tier pricing, automatic payments, manual subscription cancellation, and repurchase.
NoteEach subscription in-app item can have 1 free trial period (optional), 1 to 100 lower-tier price periods (optional), and regular-tier price periods (required, but they can be canceled at any time by testers, or are automatically canceled after 12 periods when IAP test periods apply).
Depending on the IAP test environment, free trial and subscription periods end after either:
Registered item periods
Free trial and subscription periods end as specified in the subscription item’s Seller Portal registration, which can be weeks, months, or years.
Apply during production closed beta tests for non-licensed testers.
IAP test periods
Free trial and subscription periods end every 10 minutes on the hour (at hh:10, hh:20, hh:30, …). The first period after purchase or repurchase ends at the next 10-minute time. For example, if an item with a free trial is first purchased at 11:08, free trial ends at 11:10.
Apply during always successful side-load tests for all testers, and production closed beta tests for licensed testers.
NoteWhen testing in India, the user's extension status is checked every 10 minutes.
NoteThe following steps are for side-load testers and licensed testers who are not charged for purchases, and free trials and subscriptions end at IAP test periods.
Non-Licensed testers are charged for purchases, and periods end as registered.
Purchase a subscription item.
NoteIf an item with a free trial and/or lower-tier pricing is purchased in an IAP test, and the same tester purchases the same item in another IAP test, the free trial and lower-tier pricing will not be in effect.
To test a free trial or lower-tier pricing again, either:
Re-Register a new item (for example, with a different name), and have the same tester purchase the item.
Have another tester purchase the item.
Test item after initial purchase.
Verify the following occur according to the diagrams below for the applicable scenario:
Free or registered purchase price, and other purchase details, in the purchase email sent to you.
First auto-payment email is sent at the next 10 minutes on the hour and the first auto-payment price (registered lower-tier or regular-tier).
Additional auto-payment emails are sent every 10 minutes on the hour and the auto-payment price (registered lower-tier or regular-tier).
Test item repurchase:
a. Purchase the subscription item again.
b. Verify the following occur according to the diagram below for all item types:
• Regular-tier price in the purchase email sent to you soon after purchase.
• First auto-payment email is sent 10 minutes on the hour after purchase.
• Regular-tier price in all auto-payment emails sent every 10 minutes on the hour.
Test manual subscription cancellation:
a. In the Galaxy Store at any time before auto-cancellation, click My page > Receipts > Items tab > [Select purchased item] > Unsubscribe.
b. Verify a cancellation email is sent to you.
Example Subscription Item Testing
In both examples, either a side-load test was set up with a tester, or a production closed beta test was set up with a registered licensed tester. Free trial and subscription periods were at IAP test periods, and free trial and lower pricing are not in effect after item repurchase.
Non-Tiered Subscription Item with Purchase, Free Trial, Manual Cancellation, and Repurchase
The test subscription in-app item has a 7-day free trial period, and a regular $4.99 monthly subscription price. Times (hh:mm local time) are for the listed actions and events.
Tiered Subscription with Purchase, Free Trial, Manual Cancellation, Repurchase, and Automatic Cancellation
The test subscription in-app item has a 7-day free trial period, a $2.99 lower-tier monthly subscription price for 3 months, and a $4.99 regular-tier monthly subscription price.
Times (hh:mm local time) are for listed events.
4. After IAP Testing
After you complete all IAP testing and before you submit your app and its in-app items for validation testing, you must prepare them for normal publication.
NoteYou can only track the purchase history of a beta test app during beta testing. When the app is updated to a regular (non-beta) installation, the beta test purchase history is no longer available.
To prepare for normal publication
For subscription items purchased during IAP testing, ensure their subscriptions are canceled.
Delete the tested app from the tester mobile device(s).
In the app code to be submitted for validation testing, ensure that the IAP operating mode is OPERATION_MODE_PRODUCTION.
CautionIf an app with the IAP operating mode set to OPERATION_MODE_TEST is normally published, licensed testers are not charged for in-app item purchases. All other users receive an error message.
In Seller Portal:
a. Delete all licensed testers that are registered in your profile.
b. If the app was changed after IAP testing, update the app registration with the production version of the app and change the registration information as necessary.
c. Submit the app for validation testing by Samsung and normal publication in the Galaxy Store.
For details, see the Application Registration Guide.
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.