Search.../

memberListOrders( )

Developer Preview

Lists orders for the currently logged-in member.

Description

The memberListOrders() function returns a Promise that resolves to a list of up to 100 pricing plan orders.

Syntax

function memberListOrders(options: MemberListOrdersOptions): Promise<MemberListOrdersResponse>

memberListOrders Parameters

NAME
TYPE
DESCRIPTION
options
Optional
MemberListOrdersOptions

Filtering, sorting, and pagination options.

Returns

Return Type:

Promise<
MemberListOrdersResponse
>
NAME
TYPE
DESCRIPTION
orders
Array<
Order
>

List of orders.

pagingMetadata
PagingMetadataV2

Object containing paging-related data (number of orders returned, offset).

Was this helpful?

Get orders for currently logged in members

Copy Code
1import { orders } from 'wix-pricing-plans.v2';
2
3export async function myMemberListOrdersFunction() {
4 try {
5 const ordersList = await orders.memberListOrders();
6 return ordersList;
7 } catch (error) {
8 console.error(error);
9 // Handle the error
10 }
11}
12
13/* Promise resolves to:
14 * {
15 * "orders": [
16 * {
17 * "planPrice": "0",
18 * "_id": "292c6b6b-81ec-4c10-b067-78b1a1b2fada",
19 * "_createdDate": "2024-02-05T17:26:23.348Z",
20 * "subscriptionId": "973e0e0b-85c2-4d2b-9693-fc8f1140d958",
21 * "pausePeriods": [],
22 * "_updatedDate": "2024-02-05T17:26:24.129Z",
23 * "planName": "Free Plan",
24 * "buyer": {
25 * "memberId": "695568ff-1dc2-49ff-83db-2b518d35692b",
26 * "contactId": "695568ff-1dc2-49ff-83db-2b518d35692b"
27 * },
28 * "lastPaymentStatus": "NOT_APPLICABLE",
29 * "status": "ACTIVE",
30 * "orderMethod": "UNKNOWN",
31 * "planDescription": "",
32 * "formData": {
33 * "formId": "ee62cefa-bdc2-4b5d-baab-6faeef83cecb",
34 * "submissionId": "6d68798b-b5ea-4471-b029-dea6e4ac043a",
35 * "submissionData": {}
36 * },
37 * "statusNew": "ACTIVE",
38 * "cycles": [
39 * {
40 * "index": 1,
41 * "startedDate": "2024-02-05T17:26:23.348Z"
42 * }
43 * ],
44 * "type": "ONLINE",
45 * "planId": "3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b",
46 * "startDate": "2024-02-05T17:26:23.348Z",
47 * "currentCycle": {
48 * "index": 1,
49 * "startedDate": "2024-02-05T17:26:23.348Z"
50 * },
51 * "pricing": {
52 * "singlePaymentUnlimited": true,
53 * "prices": [
54 * {
55 * "duration": {
56 * "cycleFrom": 1,
57 * "numberOfCycles": 1
58 * },
59 * "price": {
60 * "tax": {
61 * "name": "Tax",
62 * "includedInPrice": false,
63 * "rate": "6.5",
64 * "amount": "0"
65 * },
66 * "total": "0",
67 * "proration": "0",
68 * "fees": [],
69 * "currency": "USD",
70 * "subtotal": "0.00",
71 * "discount": "0"
72 * }
73 * }
74 * ]
75 * },
76 * "priceDetails": {
77 * "planPrice": "0",
78 * "tax": {
79 * "name": "Tax",
80 * "includedInPrice": false,
81 * "rate": "6.5",
82 * "amount": "0"
83 * },
84 * "total": "0",
85 * "currency": "USD",
86 * "subtotal": "0.00",
87 * "discount": "0",
88 * "singlePaymentUnlimited": true
89 * }
90 * },
91 * {
92 * "planPrice": "0",
93 * "_id": "7b4ec42c-582a-4e2f-874b-09e66e0ae09d",
94 * "_createdDate": "2024-01-28T08:35:15.230Z",
95 * "subscriptionId": "08bc02c5-7663-4578-948a-ff23370e07e5",
96 * "pausePeriods": [],
97 * "_updatedDate": "2024-01-28T08:35:16.080Z",
98 * "planName": "Standard Plan",
99 * "buyer": {
100 * "memberId": "695568ff-1dc2-49ff-83db-2b518d35692b",
101 * "contactId": "695568ff-1dc2-49ff-83db-2b518d35692b"
102 * },
103 * "lastPaymentStatus": "NOT_APPLICABLE",
104 * "status": "ACTIVE",
105 * "orderMethod": "UNKNOWN",
106 * "planDescription": "Full functionality for new users",
107 * "formData": {
108 * "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4",
109 * "submissionId": "2cf62c7a-d3ed-4dd9-816d-01919aaf2170",
110 * "submissionData": {}
111 * },
112 * "statusNew": "ACTIVE",
113 * "cycles": [
114 * {
115 * "index": 1,
116 * "startedDate": "2024-01-28T08:35:15.230Z"
117 * }
118 * ],
119 * "type": "ONLINE",
120 * "planId": "df83348a-777d-46ab-8d62-a43c415bdb11",
121 * "startDate": "2024-01-28T08:35:15.230Z",
122 * "currentCycle": {
123 * "index": 1,
124 * "startedDate": "2024-01-28T08:35:15.230Z"
125 * },
126 * "pricing": {
127 * "singlePaymentUnlimited": true,
128 * "prices": [
129 * {
130 * "duration": {
131 * "cycleFrom": 1,
132 * "numberOfCycles": 1
133 * },
134 * "price": {
135 * "total": "0",
136 * "proration": "0",
137 * "fees": [],
138 * "currency": "USD",
139 * "subtotal": "0.00",
140 * "discount": "0"
141 * }
142 * }
143 * ]
144 * },
145 * "priceDetails": {
146 * "planPrice": "0",
147 * "total": "0",
148 * "currency": "USD",
149 * "subtotal": "0.00",
150 * "discount": "0",
151 * "singlePaymentUnlimited": true
152 * }
153 * }
154 * ]
155 * }
156 */