Sandbox Testing
You don't need to make real purchases in order to test your subscriptions. You can make sure your subscriptions have been implemented correctly by using the sandbox environments. These environments will generally behave as the real stores, without incurring any costs.
RevenueCat will automatically detect the environment (production vs. sandbox) in which a purchase occurs, so no additional configuration is required in RevenueCat to test in sandbox.
Viewing Sandbox Data
Clicking the sandbox data toggle in the upper right hand corner of your RevenueCat dashboard will change the Overview metrics to report sandbox purchases. To go back to production purchases you will need to toggle this off. There's no concept of a sandbox or production user in RevenueCat, since the same App User Id can have both production and sandbox receipts. Because of this, the 'Sandbox data' toggle will not affect 'Installs' or 'Active User' cards.
Sandbox Limitations
In general, the sandbox environments behave nearly identical to the production environments. That being said, we recommend to test only the flow of a purchase in sandbox mode, and not metadata-related tests on products. This is because:
- Store APIs often do not return accurate prices across regions, including in TestFlight on iOS
- Store APIs often do not return accurate names and descriptions for products
While the production environment is generally more stable than the sandbox environment, we're not able to provide support on why store APIs are not up to date at any given moment. For this reason, we recommend only testing the flow of a purchase in sandbox mode instead. For example:
- Initiate a purchase
- Complete a purchase
- Verify content has been unlocked
This will ensure you are properly unlocking content for a purchase, and in production you'll see more accurate metadata.