> 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: managementGetOrder(_id: string, options: ManagementGetOrderOptions) # Method package: wixPricingPlansV2 # Method menu location: wixPricingPlansV2 --> orders --> managementGetOrder # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-v2/orders/management-get-order.md # Method Description: Retrieves an order by ID. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get an order (dashboard page code) ```javascript import { orders } from 'wix-pricing-plans.v2'; import { elevate } from 'wix-auth'; /* Sample _id value:'12178428-36b7-4cf5-bfb5-0ba8c83c4e8c' */ const elevatedManagementGetOrder = elevate(orders.managementGetOrder); export async function myManagementGetOrderFunction(_id) { try { const order = await elevatedManagementGetOrder(_id); return order; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * order: { * "_createdDate": "2024-01-31T10:59:16.422Z", * "_id": "12178428-36b7-4cf5-bfb5-0ba8c83c4e8c", * "_updatedDate": "2024-01-31T10:59:17.495Z", * "buyer": { * "contactId": "3fc889f6-18e8-4fd9-a509-27db9f037f26", * "memberId": "3fc889f6-18e8-4fd9-a509-27db9f037f26" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * } * ], * "formData": { * "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4", * "submissionData": {}, * "submissionId": "e65d5d60-7e07-4d2f-971f-e471dcebd0d2" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "orderMethod": "UNKNOWN", * "planDescription": "Full functionality for new users", * "planId": "df83348a-777d-46ab-8d62-a43c415bdb11", * "planName": "Standard Plan", * "planPrice": "0", * "priceDetails": { * "currency": "USD", * "discount": "0", * "planPrice": "0", * "singlePaymentUnlimited": true, * "subtotal": "0.00", * "total": "0" * }, * "pricing": { * "prices": [ * { * "duration": { * "cycleFrom": 1, * "numberOfCycles": 1 * }, * "price": { * "currency": "USD", * "discount": "0", * "fees": [], * "proration": "0", * "subtotal": "0.00", * "total": "0" * } * } * ], * "singlePaymentUnlimited": true * }, * "startDate": "2024-01-31T10:59:16.422Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "b1e7d751-7727-4c07-a0b5-0ab017ef7d1b", * "type": "ONLINE" * } * } */ ``` ## Get an order (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans.v2'; import { elevate } from 'wix-auth'; // Sample _id value:'12178428-36b7-4cf5-bfb5-0ba8c83c4e8c' const elevatedManagementGetOrder = elevate(orders.managementGetOrder); export const myManagementGetOrderFunction = webMethod(Permissions.Anyone, async (_id) => { try { const order = await elevatedManagementGetOrder(_id); return order; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: * { * order: { * "_createdDate": "2024-01-31T10:59:16.422Z", * "_id": "12178428-36b7-4cf5-bfb5-0ba8c83c4e8c", * "_updatedDate": "2024-01-31T10:59:17.495Z", * "buyer": { * "contactId": "3fc889f6-18e8-4fd9-a509-27db9f037f26", * "memberId": "3fc889f6-18e8-4fd9-a509-27db9f037f26" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * } * ], * "formData": { * "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4", * "submissionData": {}, * "submissionId": "e65d5d60-7e07-4d2f-971f-e471dcebd0d2" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "orderMethod": "UNKNOWN", * "planDescription": "Full functionality for new users", * "planId": "df83348a-777d-46ab-8d62-a43c415bdb11", * "planName": "Standard Plan", * "planPrice": "0", * "priceDetails": { * "currency": "USD", * "discount": "0", * "planPrice": "0", * "singlePaymentUnlimited": true, * "subtotal": "0.00", * "total": "0" * }, * "pricing": { * "prices": [ * { * "duration": { * "cycleFrom": 1, * "numberOfCycles": 1 * }, * "price": { * "currency": "USD", * "discount": "0", * "fees": [], * "proration": "0", * "subtotal": "0.00", * "total": "0" * } * } * ], * "singlePaymentUnlimited": true * }, * "startDate": "2024-01-31T10:59:16.422Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "b1e7d751-7727-4c07-a0b5-0ab017ef7d1b", * "type": "ONLINE" * } * } */ ``` ## Get an order with options ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans.v2'; import { elevate } from 'wix-auth'; /* Sample _id value:'12178428-36b7-4cf5-bfb5-0ba8c83c4e8c' * * Sample options value: * { * fieldSet: 'FULL' * } * */ const elevatedManagementGetOrder = elevate(orders.managementGetOrder); export const myManagementGetOrderFunction = webMethod(Permissions.Anyone, async (_id) => { try { const order = await elevatedManagementGetOrder(_id); return order; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: * { * "_createdDate": "2024-01-31T10:59:16.422Z", * "_id": "12178428-36b7-4cf5-bfb5-0ba8c83c4e8c", * "_updatedDate": "2024-01-31T10:59:17.495Z", * "buyer": { * "contactId": "3fc889f6-18e8-4fd9-a509-27db9f037f26", * "memberId": "3fc889f6-18e8-4fd9-a509-27db9f037f26" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * } * ], * "formData": { * "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4", * "submissionData": { * "email_7b7a": "Sgray@email.com", * "first_name_e841": "Stanley", * "form_field_1b5e": true, * "last_name_3347": "Grayson" * }, * "submissionId": "e65d5d60-7e07-4d2f-971f-e471dcebd0d2" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "order": { * "currentCycle": { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-31T10:59:16.422Z" * } * ], * "formData": { * "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4", * "submissionData": { * "email_7b7a": "Sgray@email.com", * "first_name_e841": "Stanley", * "form_field_1b5e": true, * "last_name_3347": "Grayson" * }, * "submissionId": "e65d5d60-7e07-4d2f-971f-e471dcebd0d2" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "orderMethod": "UNKNOWN", * "planDescription": "Full functionality for new users", * "planId": "df83348a-777d-46ab-8d62-a43c415bdb11", * "planName": "Standard Plan", * "planPrice": "0", * "priceDetails": { * "currency": "USD", * "discount": "0", * "planPrice": "0", * "singlePaymentUnlimited": true, * "subtotal": "0.00", * "total": "0" * }, * "pricing": { * "prices": [ * { * "duration": { * "cycleFrom": 1, * "numberOfCycles": 1 * }, * "price": { * "currency": "USD", * "discount": "0", * "fees": [], * "proration": "0", * "subtotal": "0.00", * "total": "0" * } * } * ], * "singlePaymentUnlimited": true * }, * "startDate": "2024-01-31T10:59:16.422Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "b1e7d751-7727-4c07-a0b5-0ab017ef7d1b", * "type": "ONLINE" * }, * "pausePeriods": [], * "planDescription": "Full functionality for new users", * "planId": "df83348a-777d-46ab-8d62-a43c415bdb11", * "planName": "Standard Plan", * "planPrice": "0", * "priceDetails": { * "currency": "USD", * "discount": "0", * "planPrice": "0", * "singlePaymentUnlimited": true, * "subtotal": "0.00", * "total": "0" * }, * "pricing": { * "prices": [ * { * "duration": { * "cycleFrom": 1, * "numberOfCycles": 1 * }, * "price": { * "currency": "USD", * "discount": "0", * "fees": [], * "proration": "0", * "subtotal": "0.00", * "total": "0" * } * } * ], * "singlePaymentUnlimited": true * }, * "startDate": "2024-01-31T10:59:16.422Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "b1e7d751-7727-4c07-a0b5-0ab017ef7d1b", * "type": "ONLINE" * } */ ``` ---