This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Lists orders for the currently logged-in member.
The memberListOrders()
function returns a Promise that resolves to a list of up to 100 pricing plan orders.
function memberListOrders(
options: MemberListOrdersOptions,
): Promise<MemberListOrdersResponse>;
Filtering, sorting, and pagination options.
import { orders } from "wix-pricing-plans.v2";
export async function myMemberListOrdersFunction() {
try {
const ordersList = await orders.memberListOrders();
return ordersList;
} catch (error) {
console.error(error);
// Handle the error
}
}
/* Promise resolves to:
* {
* "orders": [
* {
* "planPrice": "0",
* "_id": "292c6b6b-81ec-4c10-b067-78b1a1b2fada",
* "_createdDate": "2024-02-05T17:26:23.348Z",
* "subscriptionId": "973e0e0b-85c2-4d2b-9693-fc8f1140d958",
* "pausePeriods": [],
* "_updatedDate": "2024-02-05T17:26:24.129Z",
* "planName": "Free Plan",
* "buyer": {
* "memberId": "695568ff-1dc2-49ff-83db-2b518d35692b",
* "contactId": "695568ff-1dc2-49ff-83db-2b518d35692b"
* },
* "lastPaymentStatus": "NOT_APPLICABLE",
* "status": "ACTIVE",
* "orderMethod": "UNKNOWN",
* "planDescription": "",
* "formData": {
* "formId": "ee62cefa-bdc2-4b5d-baab-6faeef83cecb",
* "submissionId": "6d68798b-b5ea-4471-b029-dea6e4ac043a",
* "submissionData": {}
* },
* "statusNew": "ACTIVE",
* "cycles": [
* {
* "index": 1,
* "startedDate": "2024-02-05T17:26:23.348Z"
* }
* ],
* "type": "ONLINE",
* "planId": "3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b",
* "startDate": "2024-02-05T17:26:23.348Z",
* "currentCycle": {
* "index": 1,
* "startedDate": "2024-02-05T17:26:23.348Z"
* },
* "pricing": {
* "singlePaymentUnlimited": true,
* "prices": [
* {
* "duration": {
* "cycleFrom": 1,
* "numberOfCycles": 1
* },
* "price": {
* "tax": {
* "name": "Tax",
* "includedInPrice": false,
* "rate": "6.5",
* "amount": "0"
* },
* "total": "0",
* "proration": "0",
* "fees": [],
* "currency": "USD",
* "subtotal": "0.00",
* "discount": "0"
* }
* }
* ]
* },
* "priceDetails": {
* "planPrice": "0",
* "tax": {
* "name": "Tax",
* "includedInPrice": false,
* "rate": "6.5",
* "amount": "0"
* },
* "total": "0",
* "currency": "USD",
* "subtotal": "0.00",
* "discount": "0",
* "singlePaymentUnlimited": true
* }
* },
* {
* "planPrice": "0",
* "_id": "7b4ec42c-582a-4e2f-874b-09e66e0ae09d",
* "_createdDate": "2024-01-28T08:35:15.230Z",
* "subscriptionId": "08bc02c5-7663-4578-948a-ff23370e07e5",
* "pausePeriods": [],
* "_updatedDate": "2024-01-28T08:35:16.080Z",
* "planName": "Standard Plan",
* "buyer": {
* "memberId": "695568ff-1dc2-49ff-83db-2b518d35692b",
* "contactId": "695568ff-1dc2-49ff-83db-2b518d35692b"
* },
* "lastPaymentStatus": "NOT_APPLICABLE",
* "status": "ACTIVE",
* "orderMethod": "UNKNOWN",
* "planDescription": "Full functionality for new users",
* "formData": {
* "formId": "3ef36359-24bd-471a-aa8b-a5ca683b50f4",
* "submissionId": "2cf62c7a-d3ed-4dd9-816d-01919aaf2170",
* "submissionData": {}
* },
* "statusNew": "ACTIVE",
* "cycles": [
* {
* "index": 1,
* "startedDate": "2024-01-28T08:35:15.230Z"
* }
* ],
* "type": "ONLINE",
* "planId": "df83348a-777d-46ab-8d62-a43c415bdb11",
* "startDate": "2024-01-28T08:35:15.230Z",
* "currentCycle": {
* "index": 1,
* "startedDate": "2024-01-28T08:35:15.230Z"
* },
* "pricing": {
* "singlePaymentUnlimited": true,
* "prices": [
* {
* "duration": {
* "cycleFrom": 1,
* "numberOfCycles": 1
* },
* "price": {
* "total": "0",
* "proration": "0",
* "fees": [],
* "currency": "USD",
* "subtotal": "0.00",
* "discount": "0"
* }
* }
* ]
* },
* "priceDetails": {
* "planPrice": "0",
* "total": "0",
* "currency": "USD",
* "subtotal": "0.00",
* "discount": "0",
* "singlePaymentUnlimited": true
* }
* }
* ]
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.