Detect Paying Users

You can find out whether a user is paying or not by checking the App Instance. This article tells you how and when to use App Instance.

Detect with client side App Instance

This is relevant for all dashboard extensions, iframe widgets and iframe pages. You can inspect the App Instance that's returned to the client.

  1. Inspect the client side App Instance.
  2. If the value matches the Product ID defined in the Pricing Plans section of the Wix Developers Center this app has a paid pricing plan. This means you need to activate your pricing plan features (if you have more than one plan, the value indicates the specific plan).

  1. If the value is null this app is free, so activate your app’s free features only.

Important:

Keep in mind that if users cancel their paid plan, the vendorProductId parameter will change to null when their plan expires. Check the vendorProductId parameter on every call.

Detect with REST API

You can call the Get App Instance REST API.

Track your renewals

  1. Call the getAppInstance endpoint.
  2. Note the following parameters in the response: expiration date, isFree, packageName (packageName is the Product ID defined in the Pricing Plans section of the Wix Developers Center).

  1. Every time there's a renewal, the expiration date parameter should update to reflect the new date.

Expired subscription date, but user still marked as premium

If the date expired, but the isFree parameter is still False - keep the user's subscription active. This means that the user has a billing issue and once they fix the issue or cancel their subscription the Instance will update.

Detect with Webhooks

Get notified when a user's payment status changes by listening to three webhooks. We recommend combining the webhook method with the above approaches:

Detect with Wix Blocks

If you're working with Blocks, then you should read our dedicated article on getting the vendorProductId in Blocks apps.

Was this helpful?
Yes
No