> 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: memberGetOrder(_id: string, options: MemberGetOrderOptions) # Method package: wixPricingPlansV2 # Method menu location: wixPricingPlansV2 --> orders --> memberGetOrder # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-v2/orders/member-get-order.md # Method Description: Retrieves an order for the currently logged-in member 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 for logged-in member (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans.v2'; // Sample _id: '7b4ec42c-582a-4e2f-874b-09e66e0ae09d' export const memberGetOrder = webMethod(Permissions.Anyone, async (_id) => { try { const order = await orders.memberGetOrder(_id); return order; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: * { * "_createdDate": "2024-01-28T08:35:15.230Z", * "_id": "7b4ec42c-582a-4e2f-874b-09e66e0ae09d", * "_updatedDate": "2024-01-28T08:35:16.080Z", * "buyer": { * "contactId": "695568ff-1dc2-49ff-83db-2b518d35692b", * "memberId": "695568ff-1dc2-49ff-83db-2b518d35692b" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-01-28T08:35:15.230Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-28T08:35:15.230Z" * } * ], * "formData": { * "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4", * "submissionData": {}, * "submissionId": "2cf62c7a-d3ed-4dd9-816d-01919aaf2170" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "orderMethod": "UNKNOWN", * "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-28T08:35:15.230Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "08bc02c5-7663-4578-948a-ff23370e07e5", * "type": "ONLINE" * } */ ``` ## Get an order for a logged-in member with options ```javascript import { orders } from 'wix-pricing-plans.v2'; /* Sample _id: 'b14e3821-868f-4aa6-b874-e9240100985c' * * Sample options value: * { * fieldSet: 'FULL' * } */ export async function memberGetOrder(_id, options) { try { const order = await orders.memberGetOrder(_id, options); return order; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * "_createdDate": "2024-01-31T10:20:31.602Z", * "_id": "b14e3821-868f-4aa6-b874-e9240100985c", * "_updatedDate": "2024-01-31T10:20:32.819Z", * "buyer": { * "contactId": "fa16f1dc-0fbd-41c0-8efc-53333e3fce1e", * "memberId": "fa16f1dc-0fbd-41c0-8efc-53333e3fce1e" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-01-31T10:20:31.602Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-31T10:20:31.602Z" * } * ], * "formData": { * "formId": "ee62cefa-bdc2-4b5d-baab-6faeef83cecb", * "submissionData": { * "email_0fd2": "JV@email.com", * "first_name_c551": "Jonathan", * "form_field_aa30": false, * "last_name_78e9": "Vernes", * "phone_8cf1": "918-455-2587" * }, * "submissionId": "9e128ddb-f62f-4a4a-adb5-064af40f18db" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "orderMethod": "UNKNOWN", * "pausePeriods": [], * "planDescription": "", * "planId": "3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b", * "planName": "Free 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:20:31.602Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "1c36ad20-fbc1-4857-8fda-efb8d2cd1a5c", * "type": "ONLINE" * } */ ``` ## Get an order for a logged-in member with options ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans.v2'; /* * Sample _id: 'b14e3821-868f-4aa6-b874-e9240100985c' * * Sample options value: * { * fieldSet: 'FULL' * } */ export const memberGetOrder = webMethod(Permissions.Anyone, async (_id, options) => { try { const order = await orders.memberGetOrder(_id, options); return order; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: * { * "_createdDate": "2024-01-31T10:20:31.602Z", * "_id": "b14e3821-868f-4aa6-b874-e9240100985c", * "_updatedDate": "2024-01-31T10:20:32.819Z", * "buyer": { * "contactId": "fa16f1dc-0fbd-41c0-8efc-53333e3fce1e", * "memberId": "fa16f1dc-0fbd-41c0-8efc-53333e3fce1e" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-01-31T10:20:31.602Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-01-31T10:20:31.602Z" * } * ], * "formData": { * "formId": "ee62cefa-bdc2-4b5d-baab-6faeef83cecb", * "submissionData": { * "email_0fd2": "JV@email.com", * "first_name_c551": "Jonathan", * "form_field_aa30": false, * "last_name_78e9": "Vernes", * "phone_8cf1": "918-455-2587" * }, * "submissionId": "9e128ddb-f62f-4a4a-adb5-064af40f18db" * }, * "lastPaymentStatus": "NOT_APPLICABLE", * "orderMethod": "UNKNOWN", * "pausePeriods": [], * "planDescription": "", * "planId": "3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b", * "planName": "Free 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:20:31.602Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "1c36ad20-fbc1-4857-8fda-efb8d2cd1a5c", * "type": "ONLINE" * } */ ``` ---