Sandbox Data

Test in-app purchases and subscriptions after implementing Qonversion SDKs

1. View Test Data

You can see the test data in Qonversion by switching the Sandbox mode toggle on the left-side menu at the bottom in Qonversion Dashboard. While using this mode, you will see the Test Mode label at the top of all the dashboards. Remember to switch it off when you have finished testing.

🚧

Make sure to use a device (not a simulator) when testing iOS purchases.

View Sandbox Purchases

View Sandbox Purchases

With Qonversion SDK initialisation, you can set the environment to distinguish sandbox and production users.

let config = Qonversion.Configuration(projectKey: "projectKey", launchMode: .subscriptionManagement)
config.setEnvironment(.sandbox)
Qonversion.initWithConfig(config)
QONConfiguration *configuration = [[QONConfiguration alloc] initWithProjectKey:@"projectKey" launchMode:QONLaunchModeSubscriptionManagement];
[configuration setEnvironment:QONEnvironmentSandbox];
[Qonversion initWithConfig:configuration];
final QonversionConfig qonversionConfig = new QonversionConfig.Builder(
        this,
        "projectKey",
        QLaunchMode.SubscriptionManagement
)
        .setEnvironment(QEnvironment.Sandbox)
        .build();
Qonversion.initialize(qonversionConfig);
val qonversionConfig = QonversionConfig.Builder(
    this,
    "projectKey",
    QLaunchMode.SubscriptionManagement
)
    .setEnvironment(QEnvironment.Sandbox)
    .build()
Qonversion.initialize(qonversionConfig)
final config = new QonversionConfigBuilder(
    'projectKey',
    QLaunchMode.subscriptionManagement
)
    .setEnvironment(QEnvironment.sandbox)
    .build();
Qonversion.initialize(config);
const config = new QonversionConfigBuilder(
  'projectKey',
  LaunchMode.SUBSCRIPTION_MANAGEMENT
)
  .setEnvironment(Environment.SANDBOX)
  .build();
Qonversion.initialize(config);
QonversionConfig config = new QonversionConfigBuilder(
        "projectKey",
        LaunchMode.SubscriptionManagement
    )
    .SetEnvironment(Environment.Sandbox)
    .Build();
Qonversion.Initialize(config);

🚧

Do not use the sandbox environment in production. Set the production environment before releasing your app to an app store.

Please note sandbox subscriptions renew at an accelerated rate and will auto-renew six times before unsubscribing the subscriber. This lets you test how your app handles subscription renewal and expiration states.

Subscription DurationApple Test Subscription RenewalGoogle Test Subscription Renewal
1 week3 minutes5 minutes
1 month5 minutes5 minutes
2 months10 minutes–
3 months15 minutes10 minutes
6 months30 minutes15 minutes
1 year1 hour30 minutes

2. Send Test Events to the Integrations

You can test an integration by sending test events to it. Navigate to the integration you want to test and switch on the Send sandbox events toggle. Remember to turn it off once you have completed the testing to avoid having mixed sandbox & production data in your integration.

3. Testing Checklist

β˜‘οΈ Make sure you can see test trials and subscriptions on your Qonversion Dashboard.

If you see the test subscriptions, your integration with the subscription provider (App Store, Google Play, Stripe) is correct. Qonversion adds purchases to dashboards after validating them with Apple, Google or Stripe.
If you can't see any test subscriptions with Sandbox mode turned on after making a purchase, check the App-Specific Shared Secret for the iOS app, Service Account Key for Android App or Stripe Sandbox your project settings.

β˜‘οΈ Check your test events have been delivered to your integrations.

Make sure to turn on the Send sandbox events toggle in the integrations you want to test before purchasing. You can see the last events sent to active integration in the Events Dashboard on the left side menu. You can see the status of each event by clicking on it. Make sure that the event was delivered. In case you see an error message, check your integration settings.