Setup Alternative Store Payments

nowSDK enables support for Payments across now.gg Powered and Alternative stores using the payments module. This document illustrates the steps required to set up payments for alternative stores.

Prerequisites

The following requirements must be met to enable Alternative Store Payments:

  • Payments Integration – Make sure you’ve integrated our Payments Module.
  • nowStudio Setup
    • Select the stores where you want to publish your app. Read more.

1. Supported Stores

The following stores are currently supported:

  • Powered by now.gg
    • Cloud Store
    • BlueStacks Store
  • Alternative Stores
    • Samsung Galaxy Store
    • Xiaomi GetApps
    • ONE Store
    • Amazon Appstore
    • Huawei AppGallery (Coming Soon)

2. Build Configurations

Once you have integrated the Payments module from nowSDK, ensure that the following changes are made in your final build before providing us with the final APK.

2.1 Add Dependencies to build.gradle

Add the following dependencies to your module/app level build.gradle:

Note: Only required for Native Android Apps.

<!-- Xiaomi GetApps -->
 implementation "com.xiaomi.billingclient:billing:1.1.3"

<!-- ONE Store -->
 implementation "com.onestorecorp.sdk:sdk-iap:21.01.00"


2.2 Add/Update Repositories

Update your root level build.gradle or settings.gradle to include these repositories:

 <!-- ONE Store -->
  pluginManagement {
     repositories {
         google {
             content {
                 includeGroupByRegex("com\\.android.*")
                 includeGroupByRegex("com\\.google.*")
                 includeGroupByRegex("androidx.*")
             }
         }
         maven { url "https://jitpack.io" }
         maven { url = uri("https://repo.onestore.net/repository/onestore-sdk-public") }
         mavenCentral()
         gradlePluginPortal()
     }
 }
 dependencyResolutionManagement {
     repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
     repositories {
         google()
         mavenCentral()
         maven { url "https://jitpack.io" }
         maven { url = uri("https://repo.onestore.net/repository/onestore-sdk-public") }
     }
 }


2.3 Update AndroidManifest.xml

Add the following entries within your app’s AndroidManifest.xml:

<!-- Samsung Galaxy Store -->
 <uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
 <uses-permission android:name="android.permission.INTERNET"/>

 <!-- ONE Store -->
 <queries>
   <intent>
     <action android:name="com.onestore.ipc.iap.IapService.ACTION" />
   </intent>
   <intent>
     <action android:name="android.intent.action.VIEW" />
     <data android:scheme="onestore" />
   </intent>
 </queries>

 <!-- Amazon Appstore -->
 <queries>
   <package android:name="com.amazon.sdktestclient" />
   <package android:name="com.amazon.venezia" />
 </queries>


2.4 Add Samsung Library

Note: Only required for Native Android Apps for Samsung Galaxy Store.

To do this:

  1. Browse to /Modules/Payments directory of the nowSDK package to locate the samsung_iap-release.aar file.
  2. Add this provided .aar to the libs directory of your project.


2.5 Add ProGuard Rules (Only if Using ProGuard/R8)

Add these rules to your ProGuard configuration if you’ve enabled ProGuard/R8 in your app:

Important Information

  • Only required if ProGuard/R8 is enabled in your app.
 <!-- ONE Store -->
  -keep class com.gaa.sdk.base.** { *; }
  -keep class com.gaa.sdk.auth.** { *; }
  -keep class com.gaa.sdk.iap.** { *; }
  -keep class com.onestore.extern.licensing.** { *; }

3. Additional Requirements

The following are the store-specific additional requirements.

3.1 Xiaomi GetApps – Signed Empty APK

Xiaomi requires a signed empty APK during the initial submission to verify your app’s signing certificate. This step helps prevent signature mismatches and ensures the integrity and authenticity of future updates to your app.

To do this:

1. Download empty APK2. Generate/sign with your keystore:

keytool -genkey -v -keystore <your-release-key.keystore> -alias <your-key-alias> -keyalg RSA -keysize 2048 -validity 10000

 jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore <your-release-key.keystore> <your-app.apk> <your-key-alias>

3. Email signed APK to dev-support@now.gg with subject Xiaomi – Signed Empty APK.

Note: If your app is published on Google Play, it is recommended that you use the same keystore for build signing.



3.2 ONE Store – Enable Global Publishing

If you wish to publish your app globally (outside Korea), ONE Store requires a signed output.zip. This file contains your encrypted app signing key, enabling ONE Store to securely manage app signatures and verify the authenticity of your app for global distribution.

Workflow

  • We will provide you with an encryption key specific to your app, that you can use to generate the output.zip by exporting and encrypting your private signing key.

To do this:

1. Download the PEPK tool (from Google OR Mirror)2. Generate output.zip:

java -jar pepk.jar --keystore=<your-keystore-file.keystore> --alias=<your-alias> --output=output.zip --include-cert --encryptionkey=<your-encryption-key>

3. Email output.zip to dev-support@now.gg with subject ONE Store – output.zip.

Note: The PEPK tool is developed and provided by Google. It is intended for secure encryption of app signing keys and must not be modified or redistributed without proper attribution.



3.3 Amazon Appstore – PEM File

Amazon Appstore requires you to include a PEM file containing your app’s public key. This enables secure communication and purchase verification for in-app purchases, helping to prevent fraud and ensure transaction integrity.

To do this:

  • Contact dev-support@now.gg to obtain your app’s PEM file.
  • Place it in app/src/main/assets (Native Android) or Assets/StreamingAssets (Unity).
×
Text copied to clipboard
Link copied to clipbord
Questions? Please reach out to us at dev-support@now.gg