> 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 # Package: appInstance # Webhook link: https://dev.wix.com/docs/api-reference/app-management/app-instance/plan-converted-to-paid.md ## Introduction Triggered when a Wix user reaches the end of a free-trial period and is charged successfully. --- ## REST API ### Schema ``` Webhook: Plan Converted to Paid Description: Triggered when a Wix user reaches the end of a free-trial period and is charged successfully. Payload: PlanConvertedToPaid - name: operationTimeStamp | type: string | description: Date and time of conversion to paid subscription (free-trial ended). - name: vendorProductId | type: string | description: Current app plan. - name: cycle | type: PaymentCycle | description: Selected payment cycle. - enum: NO_CYCLE, MONTHLY, YEARLY, ONE_TIME, TWO_YEARS, THREE_YEARS, FOUR_YEARS, FIVE_YEARS - name: expiresOn | type: string | description: Plan expiration date. ``` --- ## JavaScript SDK ### Schema ``` Webhook: onAppInstancePlanConvertedToPaid Description: Triggered when a Wix user reaches the end of a free-trial period and is charged successfully. Payload: AppInstancePlanConvertedToPaidEnvelope - name: data | type: PlanConvertedToPaid | description: none - name: operationTimeStamp | type: Date | description: Date and time of conversion to paid subscription (free-trial ended). - name: vendorProductId | type: string | description: Current app plan. - name: cycle | type: PaymentCycle | description: Selected payment cycle. - enum: NO_CYCLE, MONTHLY, YEARLY, ONE_TIME, TWO_YEARS, THREE_YEARS, FOUR_YEARS, FIVE_YEARS - name: expiresOn | type: Date | description: Plan expiration date. - name: metadata | type: BaseEventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. ``` ### Examples ```javascript import { appInstances } from '@wix/app-management'; appInstances.onAppInstancePlanConvertedToPaid((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { appInstances } from '@wix/app-management'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { appInstances, }, }); wixClient.appInstances.onAppInstancePlanConvertedToPaid((event) => { // handle your event here }); ``` ---