> 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: onOrderMarkedAsPaid(event: OrderMarkedAsPaidEvent) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> Events --> onOrderMarkedAsPaid # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/events/on-order-marked-as-paid.md # Method Description: An event that triggers when an offline order is marked as paid. The `onOrderMarkedAsPaid()` event handler runs when an offline order is marked as paid. The received `OrderMarkedAsPaidEvent` object contains information about the offline order that was paid. > **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 an offline order is marked as paid ```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_onOrderMarkedAsPaid(event) { const orderId = event.data.order._id; const eventId = event.metadata.id; const eventTime = event.metadata.eventTime; } /* Full event object: * { * "metadata": { * "id":"823f11e2-84fc-402a-b9a3-28a40a3a473d", * "entityId":"beaf5979-536b-4659-b3fc-78cc08579eab", * "eventTime":"2022-07-26T15:19:06.150998Z", * "triggeredByAnonymizeRequest":false * }, * "data": { * "order": { * "_id":"beaf5979-536b-4659-b3fc-78cc08579eab", * "planId":"a4d57b6c-42eb-4416-b8dd-196f1c321b78", * "subscriptionId":"09c34718-6735-435c-8dd4-9ba7d7dcaa3e", * "wixPayOrderId":"c83359a7-833f-4689-8451-0f1211bdf184", * "buyer": { * "memberId":"ea3d74df-b7dc-4ca1-a7c9-c416b9017a86", * "contactId":"ea3d74df-b7dc-4ca1-a7c9-c416b9017a86" * }, * "priceDetails": { * "subtotal":"33", * "discount":"0", * "total":"33", * "planPrice":"33", * "currency":"EUR", * "singlePaymentForDuration": { * "count":6, * "unit":"MONTH" * }}, * "pricing": { * "singlePaymentForDuration": { * "count":6, * "unit":"MONTH" * }, * "prices": [{ * "duration": { * "cycleFrom":1, * "numberOfCycles":1 * }, * "price": { * "subtotal":"33", * "discount":"0", * "total":"33", * "currency":"EUR" * } * }]}, * "type":"OFFLINE", * "orderMethod":"UNKNOWN", * "status":"PENDING", * "lastPaymentStatus":"PAID", * "startDate":"2022-08-01T16:23:00.000Z", * "endDate":"2023-02-01T16:23:00.000Z", * "pausePeriods":[], * "earliestEndDate":"2023-02-01T16:23:00.000Z", * "planName":"One and Done", * "planDescription":"", * "planPrice":"33", * "_createdDate":"2022-07-24T08:17:04.278Z", * "_updatedDate":"2022-07-26T15:19:06.118Z" * } * } * } */ ``` ---