Identify and Manage App Users

In order to manage and customize your users’ experience in your app, you’ll need to:

  • Identify each site that uses your app.
  • Identify the site’s pricing plan and version of your app they’ve installed.
  • Map each pricing plan to the features it supports.

Wix provides all relevant identifying information about sites in the app instance. See About App Instances for information about identifying users based on the app instance.

Note:

If you are working in Blocks, you need to use a different Velo function to identify users, getDecodedAppInstance(). Learn how to adjust your Blocks app to pricing plans.

The relevant fields to check within the app instance are:

Field name in client-triggered instanceField name in REST instanceField name in Velo instanceField name in webhook payloadsDescription
instanceIdinstanceIdinstanceIdinstanceIdIdentifier for the specific occurrence of your app on a specific Wix site.
vendorProductIdpackageNamevendorProductIdvendorProductIdIdentifier of the paid pricing plan this site has installed, as displayed in your app's dashboard. Not returned when a free plan is installed.
/isFree//Whether the site owners have installed a free version of your app on their site.
/expirationDate/expiresOnDate and time the app's current billing cycle ends. Available only for yearly and multi-yearly plans.
uid///ID of the Wix user or site member who is logged in.
aid///ID of an anonymous site visitor.

The vendorProductId in client-triggered instance + webhook payloads, and the packageName in the Get App Instance REST endpoint, both refer to the identifier of the paid pricing plan this site has installed, as displayed in your app's dashboard:

If this ID isn’t returned, it means that this site has a free plan installed. Note that sites who cancel a paid plan will only stop returning a vendorProductId / packageName once their paid plan expires.

To support paid plan features in your app, you’ll need to check the user’s pricing plan every time they open your app, and ensure that you activate the relevant features.

Downgrade a User

Users are considered paying customers until the package they paid for has expired. Until the expiration date, they've paid for a plan and their App Instance will include the package ID in the vendorProductId property. Once their paid plan expires, we’ll automatically change the value of vendorProductId property to “null” – that’s when you should activate the app’s free plan.

Users can turn off the auto-renewal of the app's paid plan at any time. If you receive a webhook notifying you of an auto-renewal cancellation, take note that just because the auto-renewal is off, doesn't mean they aren't currently a paying customer.

You can't downgrade the user until their subscription ends at the end of the month or year, depending on your app’s payment plan.

Important: If the returned expiration date has passed, but the isFree parameter in the Get App Instance REST endpoint is still false - keep the site's pricing plan active. This means that the site owner has a billing issue. Once they either fix the issue or cancel their subscription, the date returned in the app instance data will update.

Did this help?