> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Purchases — Google Play

Follow the steps below to verify your Google Play integration with a test purchase.

## 1. Set Up License Testing

1. Go to [Google Play Console](https://play.google.com/console/) -> **Settings** -> **License testing**.
2. Add the Gmail account you will use for testing.
3. Set the license response to **RESPOND\_NORMALLY**.

## 2. Set Up a Test Device

You can use a physical device or an emulator with Google Play Store installed.

For emulators, make sure to select an image with **Google Play Store** support in Android Studio's AVD Manager.

The test Gmail account must be the **primary account** on the device.

## 3. Configure Sandbox Environment

Add the sandbox environment setting to your SDK initialization to distinguish test data from production:

```kotlin Kotlin theme={null}
val qonversionConfig = QonversionConfig.Builder(
    this,
    "[projectKey]",
    QLaunchMode.SubscriptionManagement
)
    .setEnvironment(QEnvironment.Sandbox) // Add this line for testing
    .build()
Qonversion.initialize(qonversionConfig)
```

```java Java theme={null}
final QonversionConfig qonversionConfig = new QonversionConfig.Builder(
        this,
        "[projectKey]",
        QLaunchMode.SubscriptionManagement
)
        .setEnvironment(QEnvironment.Sandbox) // Add this line for testing
        .build();
Qonversion.initialize(qonversionConfig);
```

## 4. Make a Test Purchase

1. Run your app on the test device.
2. Sign in with the license tester Gmail account.
3. Trigger a purchase — Google Play will process it in test mode.

<Warning>
  If you see "Something went wrong" during the first purchase, go to **Settings -> Accounts** on the device and complete the account sign-in process.
</Warning>

<Warning>
  Do not use the sandbox environment in production. Switch to the production environment before releasing your app.
</Warning>
