> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Test Your App's Upgrade Process ## Article: Test Your App's Upgrade Process ## Article Link: https://dev.wix.com/docs/build-apps/launch-your-app/app-distribution/test-your-app/test-your-app-s-upgrade-process.md ## Article Content: # Test Your App’s Upgrade Process Your app can include multiple [pricing plans](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/about-pricing-plans-and-business-models.md#pricing-plans) for your users to purchase. Each plan can offer different features and tiers of access to your app. This article explains how to test your app's upgrade process to ensure that your app responds as expected when an upgrade occurs. Testing helps you verify: - That your app provides all advertised features for each pricing plan. - That your app responds as expected to [events](https://dev.wix.com/docs/build-apps/develop-your-app/api-integrations/events-and-webhooks/about-events.md) relevant to the app upgrade flow, such as [Paid Plan Changed](https://dev.wix.com/docs/rest/app-management/app-instance/paid-plan-changed.md) and [Paid Plan Purchased](https://dev.wix.com/docs/rest/app-management/app-instance/paid-plan-purchased.md). ## Simulate the app purchase flow To ensure that the upgrade process for your app's paid plans behaves as expected, simulate the user experience by installing and upgrading your app from a test site. 1. Select your app in the [app dashboard](https\://dev.wix.com/app-selector?title=Select+an+App\&primaryButtonText=Select+Site\&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fhome?referralInfo=sidebar). 1. Hover over **Test App** at the top of the page, and then select **Dashboard** and a site for testing the upgrade flow. ![](https://wixmp-833713b177cebf373f611808.wixmp.com/images/f137fdb7598e7a657be5d1808cde39c5.png) App Market opens, prompting you to upgrade the app on your test site. 1. Select **Upgrade** on your app to proceed to the [Wix pricing page](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/set-up-a-wix-pricing-page.md). If you are using an [external pricing page](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/set-up-an-external-pricing-page.md), complete the checkout flow according to your site's configuration. > **Note:** For external pricing pages, ensure users cannot downgrade through your external pricing page. Downgrades or switches to monthly pricing require subscription cancellation and repurchase of the cheaper plan. 1. Select a paid plan to start the purchase flow. 1. Enter your payment information.
__Important:__ If you are upgrading to a plan with a [free trial](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/set-up-and-manage-free-trials.md), you must make a real transaction with a valid credit card. This transaction is a nominal amount for validation purposes only and you will be refunded immediately.
Payment depends on your app's [status](https://dev.wix.com/docs/build-apps/launch-your-app/app-distribution/about-app-distribution.md). - **Unpublished apps:** The total charge is $0. Use [test credit card details](https://developer.paypal.com/tools/sandbox/card-testing/) to complete the purchase.
**Tip**: If you're asked to enter a real credit card, set the currency to USD. Checkout currency is based on IP geolocation, so a VPN may be required.
- **Published apps:** [Create a test coupon](https://dev.wix.com/docs/build-apps/launch-your-app/app-promotion/create-a-coupon.md), and enter it into the **Enter promo code** section of the **Complete Your Purchase** page to complete the purchase. 1. Select **Submit Purchase** to complete your app upgrade. 1. Confirm that your upgraded app instance's functionality operates as expected. 1. To verify the upgrade for troubleshooting purposes, check that the upgrade is reflected in the app instance information. Call the following Wix APIs depending on the billing model of the upgraded plan: - **Single:** Call the [Get Purchase History](https://dev.wix.com/docs/rest/app-management/app-billing/billing/get-purchase-history.md) method and ensure that the recent upgrade is included in the `purchases` array. - **Recurring:** Call the Get App Instance method using [REST](https://dev.wix.com/docs/rest/app-management/app-instance/get-app-instance.md) or [SDK](https://dev.wix.com/docs/sdk/backend-modules/app-management/app-instances/get-app-instance.md) and verify that the `isFree` field in the response object is `false`. > **Note:** By default, apps built using [Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks.md) only support plans with recurring billing models. Verify the upgrade by calling [`getDecodedAppInstance()`](https://dev.wix.com/docs/velo/velo-only-apis/wix-application/get-decoded-app-instance.md). The response object includes a `vendorProductId` field only if the app was upgraded to a paid plan or free trial on that app instance. See this [code example](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/code-in-blocks/blocks-code-snippets.md#get-pricing-plan) and learn more about [setting Blocks app pricing plans](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/publish-blocks-apps-to-the-app-market/adjust-a-blocks-app-to-different-pricing-plans.md). ## See also - [About app distribution](https://dev.wix.com/docs/build-apps/launch-your-app/app-distribution/about-app-distribution.md) - [App checks and testing guide](https://dev.wix.com/docs/build-apps/launch-your-app/app-distribution/app-checks-and-testing-guide.md) - [Set up a freemium business model](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/set-up-a-freemium-business-model.md) - [Set up a premium business model](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/set-up-a-premium-business-model.md)