getAppInstance( )


Retrieves data about the instance of your app that's installed on a Wix site and data about the site itself. For example, to check whether the Wix user has installed a free or paid version of your app, or to check which apps made by Wix are installed on the site.

You must authenticate this method as a Wix app (REST | SDK).

To retrieve site.ownerInfo in the response, you must have the READ SITE OWNER EMAIL permission scope in addition to MANAGE YOUR APP.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Your App
Read site, business, and email details
Learn more about app permissions.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<GetAppInstanceResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onAppInstanceInstalled( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an instance of your app is installed on a Wix site.

Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: AppInstanceInstalledEnvelope): void | Promise<void>

Did this help?

onAppInstancePaidPlanAutoRenewalCancelled( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when a Wix user cancels a paid plan for your app. The Wix user can continue to use your app until the end of the current billing cycle.

Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: AppInstancePaidPlanAutoRenewalCancelledEnvelope): void | Promise<void>

Did this help?

onAppInstancePaidPlanChanged( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when a Wix user upgrades or downgrades their plan for your app.

Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: AppInstancePaidPlanChangedEnvelope): void | Promise<void>

Did this help?

onAppInstancePaidPlanPurchased( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when a Wix user purchases a paid plan for your app.

Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: AppInstancePaidPlanPurchasedEnvelope): void | Promise<void>

Did this help?

onAppInstanceRemoved( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an instance of your app is uninstalled from a Wix site.

Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: AppInstanceRemovedEnvelope): void | Promise<void>

Did this help?