> 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: enablePointsExpiration() # Method package: wixLoyaltyV2 # Method menu location: wixLoyaltyV2 --> programs --> enablePointsExpiration # Method Link: https://dev.wix.com/docs/velo/apis/wix-loyalty-v2/programs/enable-points-expiration.md # Method Description: Updates the `pointsExpiration` status to `"ENABLED"`. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Enable points expiration (export from backend code) ```javascript import { programs } from "wix-loyalty.v2"; import { webMethod, Permissions } from "wix-web-module"; import { elevate } from "wix-auth"; const elevatedEnablePointsExpiration = elevate(programs.enablePointsExpiration); export const enablePointsExpiration = webMethod( Permissions.Anyone, async () => { try { const result = await elevatedEnablePointsExpiration(); return result; } catch (error) { console.error(error); // Handle the error } }, ); /* Promise resolves to: * * { * "loyaltyProgram": { * "_createdDate": "2024-06-05T20:31:49.155Z", * "_updatedDate": "2024-06-10T07:02:59.813Z", * "name": "Loyalty", * "pointDefinition": { * "icon": "shapes/8de7ee72dcd944caa60f9e226d900f1d.svg" * }, * "pointsExpiration": { * "status": "ENABLED", * "monthsOfInactivity": 3, * "expiringPointsPercentage": 100 * }, * "premiumFeatures": { * "loyaltyProgram": true, * "tiers": true, * "pointsExpiration": true * }, * "status": "ACTIVE" * } * } */ ``` ## Enable points expiration (dashboard page code) ```javascript import { programs } from "wix-loyalty.v2"; async function enablePointsExpiration() { try { const result = await programs.enablePointsExpiration(); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * * { * "loyaltyProgram": { * "_createdDate": "2024-06-05T20:31:49.155Z", * "_updatedDate": "2024-06-10T07:02:59.813Z", * "name": "Loyalty", * "pointDefinition": { * "icon": "shapes/8de7ee72dcd944caa60f9e226d900f1d.svg" * }, * "pointsExpiration": { * "status": "ENABLED", * "monthsOfInactivity": 3, * "expiringPointsPercentage": 100 * }, * "premiumFeatures": { * "loyaltyProgram": true, * "tiers": true, * "pointsExpiration": true * }, * "status": "ACTIVE" * } * } */ ``` ---