> 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: markAsPaid(orderId: string, options: Options) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> Orders --> markAsPaid # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/orders/mark-as-paid.md # Method Description: Marks an offline pricing plan order as paid. The `markAsPaid()` function returns a Promise that resolves when the offline order is successfully marked as paid. The entire order is marked as paid, even if the order's payments are recurring. > **Note:** Marking separate payment cycles as paid is not yet supported. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments. Marking an offline order as paid causes the following changes: + The order's `lastPaymentStatus` changes to `"PAID"`. + The order's `status` changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`. An error occurs if you attempt to: + Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice. + Mark an online order as paid. The `markAsPaid()` function is supported for offline orders only. The [`onOrderMarkedAsPaid()`](wix-pricing-plans-backend/events/onOrderMarkedAsPaid) and [`onOrderUpdated()`](wix-pricing-plans-backend/events/onOrderUpdated) event handlers run when an offline order is marked as paid. > **Note**: Only site visitors with the **Manage Pricing Plans** and **Manage Subscriptions** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions/roles) > can mark offline orders as paid. You can override the permissions by setting the function's `suppressAuth` > option to `true`. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Mark an offline order as paid ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans-backend'; // Sample orderId value: '19b28b41-1ef2-42dc-afaa-9dc1854d0191' export const myMarkAsPaidFunction = webMethod(Permissions.Anyone, async (orderId) => { try { const order = await orders.markAsPaid(orderId); return order; } catch (error) { console.error(error); } }); // Returns a promise that resolves to void ``` ## Mark an offline order as paid, bypassing permission checks ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans-backend'; /* Sample orderId value: '895fd8d9-f732-444f-a82b-19f7e55e9617' * * Sample options object: * { * suppressAuth : true * } */ export const myMarkAsPaidWithOptionsFunction = webMethod(Permissions.Anyone, async (orderId, options) => { try { const order = await orders.markAsPaid(orderId, options); return order; } catch (error) { console.error(error); } }); // Returns a promise that resolves to void ``` ---