> 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 # Method name: onPlanCreated(event: PlanCreatedEvent) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> Events --> onPlanCreated # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/events/on-plan-created.md # Method Description: An event that triggers when a pricing plan is created. The `onPlanCreated()` event handler runs when a pricing plan is created. The received `PlanCreatedEvent` object contains information about the pricing plan that is created. > **Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event triggered when a pricing plan is created ```javascript // Place this code in the events.js file // of your site's Backend section. // Add the file if it doesn't exist. export function wixPricingPlans_onPlanCreated(event) { const planId = event.entity._id; const planDescription = event.entity.description; const eventId = event.metadata.id; const eventTime = event.metadata.eventTime; } /* Full event object: * { * "metadata": { * "id": "3743d382-a4d4-7e15-ada5-340ad4b5d760", * "entityId": "c61bbc26-a4d4-7e15-ada5-f99803abce33", * "eventTime": "2020-02-03T10:13:15.194Z", * "triggeredByAnonymizeRequest": false * }, * "entity": { * "_id": "c61bbc26-a4d4-7e15-ada5-f99803abce33", * "name": "Full membership", * "description":"Full membership including weekends", * "perks": [ * "Free parking", * "Express line" * ], * "pricing": { * "singlePaymentUnlimited": true, * "price": { * "value": "40", * "currency": "USD" * } * }, * "public" : true, * "_createdDate": "2020-02-03T10:13:15.194Z", * "_updatedDate": "2020-02-03T10:13:15.194Z", * "slug":"full-membership", * "maxPurchasesPerBuyer": 1, * "allowFutureStartDate": false, * "buyerCanCancel": true, * "termsAndConditions": "Copyright laws apply." * } * } */ ``` ---