Testing your In-App Purchases (Sandbox Environment)

To distribute iOS applications with in-app purchases (IAPs) on Aptoide Connect, your app needs to have our billing solution implemented. You can choose to integrate our Swift SDK or our Unity Plugin.

After implementing either of these solutions, you'll need to test your app's IAPs and see if the integration is working correctly. For this reason, we have developed a Sandbox environment for you to test IAPs.

To test your app's IAPs, you'll need to:

  1. Get your testing wallet address.
    You can do this in swift by calling:
    Sandbox.getTestingWalletAddress()
    And in Unity:
    AppCoinsSDK.Instance.GetTestingWalletAddress()
  2. Add your testing Wallet address to the Sandbox menu on the Developer Console.
  3. Use that testing Wallet address to make purchases on your app.
🚧

Associate an Account to the Sandbox Wallet

Understanding Wallet Types:

  • By default, the SDK uses a guest wallet (temporary and device-specific)
  • Calling .getTestingWalletAddress() returns the currently active wallet address

To Use a Persistent Sandbox Wallet:

  1. Initiate any purchase in your app
  2. Log in to an account when the checkout screen appears
  3. Once logged in, your account becomes associated with a permanent wallet
  4. From now on, .getTestingWalletAddress() will return this account's wallet address

Benefits:

  • Your sandbox wallet persists across app launches
  • You can access the same wallet on multiple devices by logging into the same account
  • Easier to manage and reuse sandbox funds for testing
🚧

It is mandatory to have ownership of the app to be able to use the Sandbox environment

To be able to see the Sandbox environment on the AppCoins Wallet and test your app's in-app purchases, it is mandatory that you have ownership of your app on Aptoide Connect.

Only after you add your app to the account and successfully prove ownership of your app you'll be able to see the Sandbox environment (displayed as a payment method on the AppCoins Wallet).

Using the Sandbox environment

To access the Sandbox menu, go to your Aptoide Connect Developer Console and click on Apps > Sandbox.

In this menu, you will be able to add your Wallet address dedicated to testing, see all Wallet addresses added to the account, and manage them.

To add a new Wallet address for testing, click on "Add", paste the Wallet address dedicated to testing in the Sandbox environment, and click on "Add".

The "Added" column in the Sandbox menu refers to when the Wallet address was added to the Aptoide Connect account. The "Expiration" column says when the Wallet address will automatically be set as inactive. Finally, the "Active" column is where you can toggle and change if a specific Wallet address can use the Sandbox environment or not.

📘

30 days after being added to the Sandbox menu, the Wallet address is automatically set as "Inactive"

When the Wallet address is added on the Sandbox menu, it will be set as "Active" on the toggle so it can be used on the Sandbox environment. After 30 days, this toggle will automatically change and the testing Wallet address will be set as "Inactive".

When it is inactive, the Wallet address becomes a regular Wallet and it is not possible to use it on the Sandbox environment. To be able to use it again for testing, you need to change the toggle again to "Active".

It is possible to see when the Wallet address will be automatically set as inactive by looking at the date on the "Expiration" column.

Alternatively, you can access the Sandbox menu while on the app submission form.

❗️

Login Confirmation needs to be configurated to use the Sandbox environment

Please note that in order to use the Sandbox environment to test your app's in-app purchases, the Login Confirmation needs to be configurated and active. To see how to do this, click here.

Testing in-app purchases

After adding the Wallet address on Aptoide Connect, you can test the in-app purchases inside the app by following these steps:

  • Choose the item you want to buy on your app;
  • Scroll down and choose Sandbox option to proceed with the purchase.

Once the purchase is completed, a pop-up message saying the purchase is done will be displayed on your screen. To confirm that your in-app purchases went through successfully, access the Wallet on the top menu bar on your Aptoide Connect Developer Console and tick the "Only display sandbox transactions" option:

There, you will be able to see the list of transactions made in the Sandbox environment and see the purchase you just made. Also, check on your app if the item was received.

If you can make the purchase, receive the item correctly, and no error occurs, you have successfully integrated our billing solution!