> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListOrders

# Package: pricingPlans

# Namespace: OrderManagementService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/orders/order-management-service-list-orders.md

## Permission Scopes:
Read Orders: SCOPE.DC-PAIDPLANS.READ-ORDERS

## Introduction

Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.

By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
`sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.

---

## REST API

### Schema

```
 Method: listOrders
 Description: Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.  By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order. `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
 URL: https://www.wixapis.com/pricing-plans/v2/orders
 Method: GET
 Method parameters:
   query param name: autoRenewCanceled | type: autoRenewCanceled | description: Filter by whether or not the auto-renewal of recurring orders was canceled.  
   query param name: buyerIds | type: array<buyerIds> | description: Filter by a buyer's member GUID, from the Members API.  | validation: format GUID
   param name: fieldSet | type: Set    
      - enum:
           UNKNOWN_SET - Same behavior as `BASIC`.`
           BASIC - Doesn't return any order form submission data.
           FULL - Returns all order form submission data.
   query param name: limit | type: limit | description: Number of orders to return. See Sorting and Paging for more information.  Max: `50`  | validation: minimum 1, maximum 50, format int32
   query param name: offset | type: offset | description: Number of orders to skip in the current sort order.  | validation: minimum 0, format int32
   query param name: orderStatuses | type: array<orderStatuses> | description: Filter by order status.  
                 - enum:
                 -     UNDEFINED: Undefined order status.
                 -     DRAFT: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
                 -     PENDING: Order has been purchased and its start date is set in the future.
                 -     ACTIVE: Order has been processed. The plan is available for use.
                 -     PAUSED: Order, and use of the plan, is paused. The order, and use of the plan, can be resumed.
                 -     ENDED: Order has completed its duration and is no longer available for use.
                 -     CANCELED: Order has been canceled.
   query param name: paymentStatuses | type: array<paymentStatuses> | description: Filter by payment status.  
                 - enum:
                 -     UNDEFINED: Undefined payment status.
                 -     PAID: Payment has been paid.
                 -     REFUNDED: Payment has been refunded.
                 -     FAILED: Payment transaction didn't complete.
                 -     UNPAID: Payment has not been paid.
                 -     PENDING: Billing has been initialized, but actual charge is yet to be made. This can happen for free trials and payments made with PayPal.
                 -     NOT_APPLICABLE: No payment was necessary. For example, for free plans or free trials.
   query param name: planIds | type: array<planIds> | description: Filter by plan GUIDs, from the Plans API.  | validation: format GUID
   param name: sorting | type: Sorting    
        - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
        - name: order | type: SortOrder | description: Sort order.  
             - enum: ASC, DESC
        - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
           - name: latitude | type: number | description: Address latitude.  | validation: format double
           - name: longitude | type: number | description: Address longitude.  | validation: format double
 Return type: ListOrdersResponse
  - name: orders | type: array<Order> | description: List of orders.  
     - name: id | type: string | description: Order GUID.  | read-only: true | validation: format GUID
     - name: planId | type: string | description: GUID of the plan purchased with the order, from the Plans API.  | read-only: true | validation: format GUID
     - name: subscriptionId | type: string | description: GUID of the related Wix subscription.  Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in a [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business).  | read-only: true | validation: format GUID
     - name: wixPayOrderId | type: string | description: Wix Pay order GUID.  Provided by Wix whether the order is created online or offline. The field is omitted when the order is free.  | read-only: true | validation: format GUID
     - name: buyer | type: Buyer | description: The buyer's GUIDs. Includes `memberId` and `contactId`.  Currently, Pricing Plan purchases are limited to members only. `contactId` is returned, but a buyer will not be able to purchase a plan without a `memberId`.  | read-only: true 
        - name: memberId | type: string | description: Member GUID for a Wix site member, from the Members API.  | read-only: true | validation: format GUID
        - name: contactId | type: string | description: Contact GUID for a Wix site contact, from the Contacts API.  | read-only: true | validation: format GUID
     - name: pricing | type: PricingDetails | description: Order pricing model, price, and payment schedule.  Learn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models).  | read-only: true 
        - ONE-OF: 
           - name: subscription | type: Recurrence | description: Pricing model for an order with recurring payment cycles.  
              - name: cycleDuration | type: Duration | description: Number of payment cycles the subscription is valid for. `0` for unlimited plans or for plans that are valid until canceled.  
                 - name: count | type: integer | description: Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.  | validation: minimum 1, format int32
                 - name: unit | type: PeriodUnit | description: Unit of time for the cycle duration.  
                         - enum:
                         -     UNDEFINED: Not defined.
                         -     DAY: Time unit is a day.
                         -     WEEK: Time unit is a week.
                         -     MONTH: Time unit is a month.
                         -     YEAR: Time unit is a year.
              - name: cycleCount | type: integer | description: Length of a payment cycle. For example, 1 month to have monthly payments. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. Currently, only a value of `1` is supported.  | validation: minimum 0, maximum 2000, format int32
           - name: singlePaymentForDuration | type: Duration | description: Pricing model for an order with a one-time payment and the order is valid for a specific amount of time.  
           - name: singlePaymentUnlimited | type: boolean | description: Pricing model for an order with a one-time payment and the order is valid until canceled.  
        - name: prices | type: array<SpannedPrice> | description: Pricing details for all pricing models.  | read-only: true 
           - name: duration | type: PriceDuration | description: Cycle duration to apply `price` for.  Use with all pricing models. Can apply the same price to multiple payment cycles.  
              - name: cycleFrom | type: integer | description: Price starts to apply with this cycle.  `1` is the first payment cycle for all pricing models.  
              - name: numberOfCycles | type: integer | description: Amount of cycles to apply price for.  For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.  For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.  For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`.  | validation: format int32
           - name: price | type: Price | description: Order price.  
              - name: subtotal | type: string | description: Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.  | validation: format DECIMAL_VALUE
              - name: coupon | type: Coupon | description: Coupon applied to the order, from the Coupons API.  
                 - name: code | type: string | description: Code of the applied coupon.  | validation: minLength 1, maxLength 20
                 - name: amount | type: string | description: Total discount of the coupon, as a monetary amount.  | validation: format DECIMAL_VALUE
                 - name: id | type: string | description: Coupon GUID.  | read-only: true | validation: format GUID
              - name: discount | type: string | description: Total discount applied to the order.  | validation: format DECIMAL_VALUE
              - name: tax | type: Tax | description: Tax applied to the order.  Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).  
                 - name: name | type: string | description: Name of the tax. For example, VAT.  
                 - name: includedInPrice | type: boolean | description: Whether tax is included in the original price. When `false`, tax is added at checkout.  
                 - name: rate | type: string | description: Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.  | validation: format DECIMAL_VALUE
                 - name: amount | type: string | description: Total tax, specified as a monetary amount. For example, `"3.99"`.  | validation: format DECIMAL_VALUE
              - name: total | type: string | description: Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.  If no tax is applied, the amount is the same as `subtotal`.  | validation: format DECIMAL_VALUE
              - name: currency | type: string | description: Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.  | validation: format CURRENCY
              - name: proration | type: string | description: Price change after billing date was change and price was adjusted. Could be positive and negative values.  | validation: format DECIMAL_VALUE
     - name: type | type: OrderType | description: How the order was processed.  | read-only: true 
         - enum:
         -     UNDEFINED: Undefined order type.
         -     ONLINE: The buyer purchased the plan using the site.
         -     OFFLINE: The buyer made a manual, offline purchase without using the site.
         -     EXTERNAL: The buyer made a purchase through an external payment provider.
     - name: status | type: OrderStatus | description: Status of the order.  | read-only: true 
         - enum:
         -     UNDEFINED: Undefined order status.
         -     DRAFT: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
         -     PENDING: Order has been purchased and its start date is set in the future.
         -     ACTIVE: Order has been processed. The plan is available for use.
         -     PAUSED: Order, and use of the plan, is paused. The order, and use of the plan, can be resumed.
         -     ENDED: Order has completed its duration and is no longer available for use.
         -     CANCELED: Order has been canceled.
     - name: autoRenewCanceled | type: boolean | description: Whether the order will be canceled at the next payment date.  If `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders.  | read-only: true 
     - name: cancellation | type: Cancellation | description: Details about the cancellation of an order.  Only present if the status is `CANCELED`.  | read-only: true 
        - name: requestedDate | type: string | description: Date and time the cancellation was requested.  | validation: format date-time
        - name: cause | type: CancellationCause | description: Reason for the cancellation.  
             - enum:
             -     UNDEFINED: Undefined cancellation cause.
             -     OWNER_ACTION: Wix user canceled the order.
             -     MEMBER_ACTION: Buyer initiated the cancellation.
             -     PAYMENT_FAILURE: Payment transaction failed.
             -     PAYMENT_SETUP_FAILURE: Buyer's payment details weren't set up correctly.
             -     UNKNOWN: Reason for the cancellation is unknown.
        - name: effectiveAt | type: CancellationEffectiveAt | description: When the cancellation takes effect. Set when cancelling the order.  
             - enum:
             -     UNDEFINED: Undefined cancellation time.
             -     IMMEDIATELY: Cancellation occurs immediately and the buyer can no longer use the plan.
             -     NEXT_PAYMENT_DATE: Cancellation occurs at the next payment date and time. Buyer can continue to use the plan until that date and time.
     - name: lastPaymentStatus | type: PaymentStatus | description: Status of the last payment for the order. Updated automatically for online orders. Updated manually by the Wix user for offline orders.  | read-only: true 
         - enum:
         -     UNDEFINED: Undefined payment status.
         -     PAID: Payment has been paid.
         -     REFUNDED: Payment has been refunded.
         -     FAILED: Payment transaction didn't complete.
         -     UNPAID: Payment has not been paid.
         -     PENDING: Billing has been initialized, but actual charge is yet to be made. This can happen for free trials and payments made with PayPal.
         -     NOT_APPLICABLE: No payment was necessary. For example, for free plans or free trials.
     - name: startDate | type: string | description: Start date and time for the ordered plan.  | read-only: true | validation: format date-time
     - name: endDate | type: string | description: Current end date and time for the ordered plan.  `endDate` may be updated over the course of an order. If the order is paused, it will have a later `endDate` once it is resumed. `endDate` may also be postponed.  Omitted if the order is valid until canceled and still `ACTIVE`.  | read-only: true | validation: format date-time
     - name: pausePeriods | type: array<PausePeriod> | description: List of periods during which the order is paused.  | read-only: true 
        - name: status | type: Status | description: Status of the pause period.  
             - enum:
             -     UNDEFINED: Undefined status.
             -     ACTIVE: Status while the order is paused.
             -     ENDED: Status when the order is resumed.
        - name: pauseDate | type: string | description: Start date and time of the pause period.  | validation: format date-time
        - name: resumeDate | type: string | description: End date and time of the pause period.  Omitted while the pause period remains `ACTIVE`.  | validation: format date-time
     - name: freeTrialDays | type: integer | description: Free trial period for the order, in days.  Only available for recurring plans.  | read-only: true | validation: minimum 1, maximum 999, format int32
     - name: earliestEndDate | type: string | description: Earliest end date and time that the plan for the order can expire.  Calculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use.  | read-only: true | validation: format date-time
     - name: currentCycle | type: CurrentCycle | description: Current payment cycle for the order.  `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet.  | read-only: true 
        - name: index | type: integer | description: Index of the current payment cycle in the order.  `0` when order is in a free trial period. In all other cases, the index starts with `1`.  | validation: minimum 0
        - name: startedDate | type: string | description: Start date and time for the current payment cycle.  | validation: format date-time
        - name: endedDate | type: string | description: End date and time for the current payment cycle.  | validation: format date-time
     - name: planName | type: string | description: Plan name at the time of purchase.  | read-only: true 
     - name: planDescription | type: string | description: Plan description at the time of purchase  | read-only: true 
     - name: planPrice | type: string | description: Plan price as it was at the moment of order creation.  | read-only: true | validation: format DECIMAL_VALUE
     - name: createdDate | type: string | description: Date and time the order was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the order was updated.  | read-only: true | validation: format date-time
     - name: formData | type: FormData | description: Information about the form submitted during the plan's checkout.  | read-only: true 
        - name: formId | type: string | description: GUID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction.md) associated with the plan at checkout.  | validation: format GUID
        - name: submissionId | type: string | description: GUID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created.  | validation: format GUID
        - name: submissionData | type: Map<string,Value> | description: Data submitted to the plan's order form at checkout.  | read-only: true | validation: format map
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
  - name: pagingMetadata | type: PagingMetadataV2 | description: Object containing paging-related data (number of orders returned, offset).  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### List all orders
```curl
curl -X GET \
    'https://www.wixapis.com/pricing-plans/v2/orders' \
    -H 'Authorization: <AUTH>'
```

### List CANCELED or ENDED orders
```curl
curl -X GET \
    'https://www.wixapis.com/pricing-plans/v2/orders?orderStatuses=CANCELED&orderStatuses=ENDED' \
    -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.pricingPlans.orders.managementListOrders(options)
 Description: Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.  By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order. `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
 Method parameters:
   param name: options | type: ListOrdersOptions  none  
        - name: buyerIds | type: array<string> | description: Filter by a buyer's member GUID, from the Members API.  | validation: format GUID
        - name: planIds | type: array<string> | description: Filter by plan GUIDs, from the Plans API.  | validation: format GUID
        - name: autoRenewCanceled | type: boolean | description: Filter by whether or not the auto-renewal of recurring orders was canceled.  
        - name: orderStatuses | type: array<OrderStatus> | description: Filter by order status.  
             - enum:
             -     UNDEFINED: Undefined order status.
             -     DRAFT: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
             -     PENDING: Order has been purchased and its start date is set in the future.
             -     ACTIVE: Order has been processed. The plan is available for use.
             -     PAUSED: Order, and use of the plan, is paused. The order, and use of the plan, can be resumed.
             -     ENDED: Order has completed its duration and is no longer available for use.
             -     CANCELED: Order has been canceled.
        - name: paymentStatuses | type: array<PaymentStatus> | description: Filter by payment status.  
             - enum:
             -     UNDEFINED: Undefined payment status.
             -     PAID: Payment has been paid.
             -     REFUNDED: Payment has been refunded.
             -     FAILED: Payment transaction didn't complete.
             -     UNPAID: Payment has not been paid.
             -     PENDING: Billing has been initialized, but actual charge is yet to be made. This can happen for free trials and payments made with PayPal.
             -     NOT_APPLICABLE: No payment was necessary. For example, for free plans or free trials.
        - name: limit | type: integer | description: Number of orders to return. See Sorting and Paging for more information.  Max: `50`  | validation: minimum 1, maximum 50, format int32
        - name: offset | type: integer | description: Number of orders to skip in the current sort order.  | validation: minimum 0, format int32
        - name: sorting | type: Sorting | description: Sort order.  Use `ASC` for ascending order or `DESC` for descending order.  Default: `DESC`.  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  
              - name: longitude | type: number | description: Address longitude.  
        - name: fieldSet | type: Set | description: Predefined set of fields to return.  Default: If `fieldSet` is omitted, no order form submission data is returned.  
             - enum:
             -     UNKNOWN_SET: Same behavior as `BASIC`.`
             -     BASIC: Doesn't return any order form submission data.
             -     FULL: Returns all order form submission data.
 Return type: PROMISE<ListOrdersResponse>
  - name: orders | type: array<Order> | description: List of orders.  
     - name: _id | type: string | description: Order GUID.  | read-only: true | validation: format GUID
     - name: planId | type: string | description: GUID of the plan purchased with the order, from the Plans API.  | read-only: true | validation: format GUID
     - name: subscriptionId | type: string | description: GUID of the related Wix subscription.  Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in a [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business).  | read-only: true | validation: format GUID
     - name: wixPayOrderId | type: string | description: Wix Pay order GUID.  Provided by Wix whether the order is created online or offline. The field is omitted when the order is free.  | read-only: true | validation: format GUID
     - name: buyer | type: Buyer | description: The buyer's GUIDs. Includes `memberId` and `contactId`.  Currently, Pricing Plan purchases are limited to members only. `contactId` is returned, but a buyer will not be able to purchase a plan without a `memberId`.  | read-only: true 
        - name: memberId | type: string | description: Member GUID for a Wix site member, from the Members API.  | read-only: true | validation: format GUID
        - name: contactId | type: string | description: Contact GUID for a Wix site contact, from the Contacts API.  | read-only: true | validation: format GUID
     - name: pricing | type: PricingDetails | description: Order pricing model, price, and payment schedule.  Learn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models).  | read-only: true 
        - ONE-OF: 
           - name: subscription | type: Recurrence | description: Pricing model for an order with recurring payment cycles.  
              - name: cycleDuration | type: Duration | description: Number of payment cycles the subscription is valid for. `0` for unlimited plans or for plans that are valid until canceled.  
                 - name: count | type: integer | description: Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.  | validation: minimum 1, format int32
                 - name: unit | type: PeriodUnit | description: Unit of time for the cycle duration.  
                         - enum:
                         -     UNDEFINED: Not defined.
                         -     DAY: Time unit is a day.
                         -     WEEK: Time unit is a week.
                         -     MONTH: Time unit is a month.
                         -     YEAR: Time unit is a year.
              - name: cycleCount | type: integer | description: Length of a payment cycle. For example, 1 month to have monthly payments. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. Currently, only a value of `1` is supported.  | validation: minimum 0, maximum 2000, format int32
           - name: singlePaymentForDuration | type: Duration | description: Pricing model for an order with a one-time payment and the order is valid for a specific amount of time.  
           - name: singlePaymentUnlimited | type: boolean | description: Pricing model for an order with a one-time payment and the order is valid until canceled.  
        - name: prices | type: array<SpannedPrice> | description: Pricing details for all pricing models.  | read-only: true 
           - name: duration | type: PriceDuration | description: Cycle duration to apply `price` for.  Use with all pricing models. Can apply the same price to multiple payment cycles.  
              - name: cycleFrom | type: integer | description: Price starts to apply with this cycle.  `1` is the first payment cycle for all pricing models.  
              - name: numberOfCycles | type: integer | description: Amount of cycles to apply price for.  For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.  For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.  For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`.  | validation: format int32
           - name: price | type: Price | description: Order price.  
              - name: subtotal | type: string | description: Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.  | validation: format DECIMAL_VALUE
              - name: coupon | type: Coupon | description: Coupon applied to the order, from the Coupons API.  
                 - name: code | type: string | description: Code of the applied coupon.  | validation: minLength 1, maxLength 20
                 - name: amount | type: string | description: Total discount of the coupon, as a monetary amount.  | validation: format DECIMAL_VALUE
                 - name: _id | type: string | description: Coupon GUID.  | read-only: true | validation: format GUID
              - name: discount | type: string | description: Total discount applied to the order.  | validation: format DECIMAL_VALUE
              - name: tax | type: Tax | description: Tax applied to the order.  Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).  
                 - name: name | type: string | description: Name of the tax. For example, VAT.  
                 - name: includedInPrice | type: boolean | description: Whether tax is included in the original price. When `false`, tax is added at checkout.  
                 - name: rate | type: string | description: Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.  | validation: format DECIMAL_VALUE
                 - name: amount | type: string | description: Total tax, specified as a monetary amount. For example, `"3.99"`.  | validation: format DECIMAL_VALUE
              - name: total | type: string | description: Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.  If no tax is applied, the amount is the same as `subtotal`.  | validation: format DECIMAL_VALUE
              - name: currency | type: string | description: Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.  | validation: format CURRENCY
              - name: proration | type: string | description: Price change after billing date was change and price was adjusted. Could be positive and negative values.  | validation: format DECIMAL_VALUE
     - name: type | type: OrderType | description: How the order was processed.  | read-only: true 
         - enum:
         -     UNDEFINED: Undefined order type.
         -     ONLINE: The buyer purchased the plan using the site.
         -     OFFLINE: The buyer made a manual, offline purchase without using the site.
         -     EXTERNAL: The buyer made a purchase through an external payment provider.
     - name: status | type: OrderStatus | description: Status of the order.  | read-only: true 
         - enum:
         -     UNDEFINED: Undefined order status.
         -     DRAFT: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
         -     PENDING: Order has been purchased and its start date is set in the future.
         -     ACTIVE: Order has been processed. The plan is available for use.
         -     PAUSED: Order, and use of the plan, is paused. The order, and use of the plan, can be resumed.
         -     ENDED: Order has completed its duration and is no longer available for use.
         -     CANCELED: Order has been canceled.
     - name: autoRenewCanceled | type: boolean | description: Whether the order will be canceled at the next payment date.  If `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders.  | read-only: true 
     - name: cancellation | type: Cancellation | description: Details about the cancellation of an order.  Only present if the status is `CANCELED`.  | read-only: true 
        - name: requestedDate | type: Date | description: Date and time the cancellation was requested.  
        - name: cause | type: CancellationCause | description: Reason for the cancellation.  
             - enum:
             -     UNDEFINED: Undefined cancellation cause.
             -     OWNER_ACTION: Wix user canceled the order.
             -     MEMBER_ACTION: Buyer initiated the cancellation.
             -     PAYMENT_FAILURE: Payment transaction failed.
             -     PAYMENT_SETUP_FAILURE: Buyer's payment details weren't set up correctly.
             -     UNKNOWN: Reason for the cancellation is unknown.
        - name: effectiveAt | type: CancellationEffectiveAt | description: When the cancellation takes effect. Set when cancelling the order.  
             - enum:
             -     UNDEFINED: Undefined cancellation time.
             -     IMMEDIATELY: Cancellation occurs immediately and the buyer can no longer use the plan.
             -     NEXT_PAYMENT_DATE: Cancellation occurs at the next payment date and time. Buyer can continue to use the plan until that date and time.
     - name: lastPaymentStatus | type: PaymentStatus | description: Status of the last payment for the order. Updated automatically for online orders. Updated manually by the Wix user for offline orders.  | read-only: true 
         - enum:
         -     UNDEFINED: Undefined payment status.
         -     PAID: Payment has been paid.
         -     REFUNDED: Payment has been refunded.
         -     FAILED: Payment transaction didn't complete.
         -     UNPAID: Payment has not been paid.
         -     PENDING: Billing has been initialized, but actual charge is yet to be made. This can happen for free trials and payments made with PayPal.
         -     NOT_APPLICABLE: No payment was necessary. For example, for free plans or free trials.
     - name: startDate | type: Date | description: Start date and time for the ordered plan.  | read-only: true 
     - name: endDate | type: Date | description: Current end date and time for the ordered plan.  `endDate` may be updated over the course of an order. If the order is paused, it will have a later `endDate` once it is resumed. `endDate` may also be postponed.  Omitted if the order is valid until canceled and still `ACTIVE`.  | read-only: true 
     - name: pausePeriods | type: array<PausePeriod> | description: List of periods during which the order is paused.  | read-only: true 
        - name: status | type: Status | description: Status of the pause period.  
             - enum:
             -     UNDEFINED: Undefined status.
             -     ACTIVE: Status while the order is paused.
             -     ENDED: Status when the order is resumed.
        - name: pauseDate | type: Date | description: Start date and time of the pause period.  
        - name: resumeDate | type: Date | description: End date and time of the pause period.  Omitted while the pause period remains `ACTIVE`.  
     - name: freeTrialDays | type: integer | description: Free trial period for the order, in days.  Only available for recurring plans.  | read-only: true | validation: minimum 1, maximum 999, format int32
     - name: earliestEndDate | type: Date | description: Earliest end date and time that the plan for the order can expire.  Calculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use.  | read-only: true 
     - name: currentCycle | type: CurrentCycle | description: Current payment cycle for the order.  `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet.  | read-only: true 
        - name: index | type: integer | description: Index of the current payment cycle in the order.  `0` when order is in a free trial period. In all other cases, the index starts with `1`.  | validation: minimum 0
        - name: startedDate | type: Date | description: Start date and time for the current payment cycle.  
        - name: endedDate | type: Date | description: End date and time for the current payment cycle.  
     - name: planName | type: string | description: Plan name at the time of purchase.  | read-only: true 
     - name: planDescription | type: string | description: Plan description at the time of purchase  | read-only: true 
     - name: planPrice | type: string | description: Plan price as it was at the moment of order creation.  | read-only: true | validation: format DECIMAL_VALUE
     - name: _createdDate | type: Date | description: Date and time the order was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the order was updated.  | read-only: true 
     - name: formData | type: FormData | description: Information about the form submitted during the plan's checkout.  | read-only: true 
        - name: formId | type: string | description: GUID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction.md) associated with the plan at checkout.  | validation: format GUID
        - name: submissionId | type: string | description: GUID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created.  | validation: format GUID
        - name: submissionData | type: object | description: Data submitted to the plan's order form at checkout.  | read-only: true | validation: format map
  - name: pagingMetadata | type: PagingMetadataV2 | description: Object containing paging-related data (number of orders returned, offset).  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### Manager cancellation or updated payment status of multiple orders (with $w)
In this example, the page code provides a checkable list of unpaid customer orders. The site owner or admin selects the unpaid orders to be cancelled or updated to a `PAID` payment status.

```javascript
/**********************************
 * Backend code - utils.web.js/ts *
 *********************************/

import { Permissions, webMethod } from '@wix/web-methods';
import { orders } from '@wix/pricing-plans';
import { auth } from '@wix/essentials';

const elevatedManagementListOrders = auth.elevate(orders.managementListOrders);
const elevatedCancelOrder = auth.elevate(orders.cancelOrder);
const elevatedMarkAsPaid = auth.elevate(orders.markAsPaid);

export const getUnpaidOrders = webMethod(
  Permissions.Anyone,
  async () => {
    const options = { paymentStatuses: 'UNPAID' };
    try {
      const ordersList = await elevatedManagementListOrders(options);

      return ordersList;
    } catch (error) {
      console.error(error);
      // Handle the error
    }
  });

export const cancelOrder = webMethod(
  Permissions.Anyone,
  async (orderId) => {
    const effectiveAt = 'NEXT_PAYMENT_DATE';
    try {
      await elevatedCancelOrder(orderId, effectiveAt);

      return;
    } catch (error) {
      console.error(error);
      // Handle the error
    }
  });

export const markAsPaid = webMethod(
  Permissions.Anyone,
  async (orderId) => {
    try {
      await elevatedMarkAsPaid(orderId);

      return;
    } catch (error) {
      console.error(error);
      // Handle the error
    }
  });

/*************
 * Page code *
 *************/

import { getUnpaidOrders, cancelOrder, markAsPaid } from 'backend/utils.web';

$w.onReady(function () {
  $w('#ordersCheckbox').hide();
  $w('#markAsPaidBtn').disable();
  $w('#cancelOrderBtn').disable();

  populateOrdersCheckbox();
  let orderValues;

  $w('#ordersCheckbox').onChange(() => {
    orderValues = $w('#ordersCheckbox').value;
  });

  // Cancel multiple orders 
  $w('#cancelOrderBtn').onClick(() => {
    orderValues.forEach(async (orderId) => {
      await cancelOrder(orderId);
    });
  });

  // Mark multiple orders as paid
  $w('#markAsPaidBtn').onClick(() => {
    orderValues.forEach(async (orderId) => {
      await markAsPaid(orderId);
    });
  });
});

async function populateOrdersCheckbox() {
  const unpaidOrders = await getUnpaidOrders();

  // Displays each order with its corresponding member ID
  $w('#ordersCheckbox').options = unpaidOrders.orders.map(item => {
    return {
      label: `${item.planName} - memberId: ${item.buyer.memberId}`,
      value: item._id
    }
  });
  $w('#ordersCheckbox').show();
  $w('#markAsPaidBtn').enable();
  $w('#cancelOrderBtn').enable();
}

```

### List pricing plan orders with options (with elevated permissions)
```javascript
import { orders } from '@wix/pricing-plans';
import { auth } from '@wix/essentials';

/* Sample options value:
 * {
 *   autoRenewCanceled: false,
 *   buyerIds: [
 *       '402ec90c-235a-45c4-b4cc-52204d5f6b00',
 *       '3fc889f6-18e8-4fd9-a509-27db9f037f26',
 *       'fa16f1dc-0fbd-41c0-8efc-53333e3fce1e',
 *       '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4',
 *       '695568ff-1dc2-49ff-83db-2b518d35692b',
 *       '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4',
 *       'f5691fc2-0674-4eee-92c5-da06a05981a5'
 *   ],
 *   fieldSet: 'BASIC',
 *   limit: 3,
 *   offset: 0,
 *   orderStatuses: [
 *     'ACTIVE'
 *   ],
 *   paymentStatus: [
 *     'PAID',
 *     'NOT_APPLICABLE'
 *   ],
 *   planIds: [
 *     '0da57ac8-c3d0-4687-8aea-4100781b6386',
 *     'df83348a-777d-46ab-8d62-a43c415bdb11', 
 *     '3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b', 
 *     'cb4a8c57-273a-4567-94e3-cc43d5d339f2', 
 *     'df83348a-777d-46ab-8d62-a43c415bdb11', 
 *     'aa0d8e0e-99ad-4c95-ac48-4955e37956c5', 
 *     'aa0d8e0e-99ad-4c95-ac48-4955e37956c5'
 *   ],
 *   sorting: {
 *     fieldName: 'createdDate',
 *     order: 'ASC'
 *   };
 */

const elevatedManagementListOrders = auth.elevate(orders.managementListOrders);

export async function myManagementListOrdersFunction(options) {
  try {
    const ordersList = await elevatedManagementListOrders(options);

    return ordersList;
  } catch (error) {
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to:
 * {
 *   "orders": [
 *     {
 *       "_createdDate": "2024-01-28T09:49:21.041Z",
 *       "_id": "82d99338-5653-459a-a751-b57483f7cfb5",
 *       "_updatedDate": "2024-02-04T10:42:58.888Z",
 *       "autoRenewCanceled": false,
 *       "buyer": {
 *         "contactId": "554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4",
 *         "memberId": "554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4"
 *       },
 *       "currentCycle": {
 *         "endedDate": "2024-04-27T09:49:21.041Z",
 *         "index": 0,
 *         "startedDate": "2024-01-28T09:49:21.041Z"
 *       },
 *       "cycles": [
 *         {
 *           "endedDate": "2024-04-27T09:49:21.041Z",
 *           "index": 0,
 *           "startedDate": "2024-01-28T09:49:21.041Z"
 *         }
 *       ],
 *       "endDate": "2026-07-29T09:49:21.041Z",
 *       "earliestEndDate": "2026-04-27T09:49:21.041Z",
 *       "formData": {
 *         "submissionData": {}
 *       },
 *       "freeTrialDays": 90,
 *       "lastPaymentStatus": "PAID",
 *       "orderMethod": "UNKNOWN",
 *       "pausePeriods": [],
 *       "planDescription": "3 mo free trial with discount for 1 year",
 *       "planId": "cb4a8c57-273a-4567-94e3-cc43d5d339f2",
 *       "planName": "Beginner's Plan",
 *       "planPrice": "50",
 *       "priceDetails": {
 *         "currency": "USD",
 *         "discount": "0",
 *         "freeTrialDays": 90,
 *         "planPrice": "50",
 *         "subtotal": "50.00",
 *         "total": "50.00"
 *       },
 *       "pricing": {
 *         "prices": [
 *           {
 *             "duration": {
 *               "cycleFrom": 1,
 *               "numberOfCycles": 2
 *             },
 *             "price": {
 *               "currency": "USD",
 *               "discount": "0",
 *               "fees": [],
 *               "proration": "0",
 *               "subtotal": "50.00",
 *               "total": "50.00"
 *             }
 *           }
 *         ],
 *         "singlePaymentUnlimited": true
 *       },
 *       "startDate": "2024-01-28T09:49:21.041Z",
 *       "status": "ACTIVE",
 *       "statusNew": "ACTIVE",
 *       "subscriptionId": "305f8fc9-3724-4cac-9f67-4e29f2c46def",
 *       "type": "OFFLINE",
 *       "wixPayOrderId": "2f0e79d8-f15d-46c6-ac1a-10ec7a2030fb"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 1,
 *     "hasNext": false,
 *     "offset": 0,
 *     "total": 1
 *   }
 * }
 */
```

### List pricing plan orders with options
```javascript
import { orders } from '@wix/pricing-plans';

/* Sample options value:
 * {
 *   autoRenewCanceled: false,
 *   buyerIds: [
 *       '402ec90c-235a-45c4-b4cc-52204d5f6b00',
 *       '3fc889f6-18e8-4fd9-a509-27db9f037f26',
 *       'fa16f1dc-0fbd-41c0-8efc-53333e3fce1e',
 *       '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4',
 *       '695568ff-1dc2-49ff-83db-2b518d35692b',
 *       '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4',
 *       'f5691fc2-0674-4eee-92c5-da06a05981a5'
 *   ],
 *   fieldSet: 'BASIC',
 *   limit: 3,
 *   offset: 0,
 *   orderStatuses: [
 *     'ACTIVE'
 *   ],
 *   paymentStatus: [
 *     'PAID',
 *     'NOT_APPLICABLE'
 *   ],
 *   planIds: [
 *     '0da57ac8-c3d0-4687-8aea-4100781b6386',
 *     'df83348a-777d-46ab-8d62-a43c415bdb11', 
 *     '3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b', 
 *     'cb4a8c57-273a-4567-94e3-cc43d5d339f2', 
 *     'df83348a-777d-46ab-8d62-a43c415bdb11', 
 *     'aa0d8e0e-99ad-4c95-ac48-4955e37956c5', 
 *     'aa0d8e0e-99ad-4c95-ac48-4955e37956c5'
 *   ],
 *   sorting: {
 *     fieldName: 'createdDate',
 *     order: 'ASC'
 *   };
 */

export async function myManagementListOrdersFunction(options) {
  try {
    const ordersList = await orders.managementListOrders(options);

    return ordersList;
  } catch (error) {
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to:
 * {
 *   "orders": [
 *     {
 *       "_createdDate": "2024-01-28T09:49:21.041Z",
 *       "_id": "82d99338-5653-459a-a751-b57483f7cfb5",
 *       "_updatedDate": "2024-02-04T10:42:58.888Z",
 *       "autoRenewCanceled": false,
 *       "buyer": {
 *         "contactId": "554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4",
 *         "memberId": "554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4"
 *       },
 *       "currentCycle": {
 *         "endedDate": "2024-04-27T09:49:21.041Z",
 *         "index": 0,
 *         "startedDate": "2024-01-28T09:49:21.041Z"
 *       },
 *       "cycles": [
 *         {
 *           "endedDate": "2024-04-27T09:49:21.041Z",
 *           "index": 0,
 *           "startedDate": "2024-01-28T09:49:21.041Z"
 *         }
 *       ],
 *       "endDate": "2026-07-29T09:49:21.041Z",
 *       "earliestEndDate": "2026-04-27T09:49:21.041Z",
 *       "formData": {
 *         "submissionData": {}
 *       },
 *       "freeTrialDays": 90,
 *       "lastPaymentStatus": "PAID",
 *       "orderMethod": "UNKNOWN",
 *       "pausePeriods": [],
 *       "planDescription": "3 mo free trial with discount for 1 year",
 *       "planId": "cb4a8c57-273a-4567-94e3-cc43d5d339f2",
 *       "planName": "Beginner's Plan",
 *       "planPrice": "50",
 *       "priceDetails": {
 *         "currency": "USD",
 *         "discount": "0",
 *         "freeTrialDays": 90,
 *         "planPrice": "50",
 *         "subtotal": "50.00",
 *         "total": "50.00"
 *       },
 *       "pricing": {
 *         "prices": [
 *           {
 *             "duration": {
 *               "cycleFrom": 1,
 *               "numberOfCycles": 2
 *             },
 *             "price": {
 *               "currency": "USD",
 *               "discount": "0",
 *               "fees": [],
 *               "proration": "0",
 *               "subtotal": "50.00",
 *               "total": "50.00"
 *             }
 *           }
 *         ],
 *         "singlePaymentUnlimited": true
 *       },
 *       "startDate": "2024-01-28T09:49:21.041Z",
 *       "status": "ACTIVE",
 *       "statusNew": "ACTIVE",
 *       "subscriptionId": "305f8fc9-3724-4cac-9f67-4e29f2c46def",
 *       "type": "OFFLINE",
 *       "wixPayOrderId": "2f0e79d8-f15d-46c6-ac1a-10ec7a2030fb"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 1,
 *     "hasNext": false,
 *     "offset": 0,
 *     "total": 1
 *   }
 * }
 */ 
  
```

### List pricing plan orders (with elevated permissions)
```javascript
import { orders } from '@wix/pricing-plans';
import { auth } from '@wix/essentials';

const elevatedManagementListOrders = auth.elevate(orders.managementListOrders);

export async function myManagementListOrdersFunction() {
  try {
    const ordersList = await elevatedManagementListOrders();

    return ordersList;
  } catch (error){
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to:
 * {
 *   "orders": [
 *     {
 *       "_createdDate": "2024-01-22T14:00:53.904Z",
 *       "_id": "14fac8ae-506e-4e7b-84d4-e9b094d0ddca",
 *       "_updatedDate": "2024-01-22T14:00:54.772Z",
 *       "buyer": {
 *         "contactId": "f5691fc2-0674-4eee-92c5-da06a05981a5",
 *         "memberId": "f5691fc2-0674-4eee-92c5-da06a05981a5"
 *       },
 *       "currentCycle": {
 *         "index": 1,
 *         "startedDate": "2024-01-22T14:00:53.904Z"
 *       },
 *       "cycles": [
 *         {
 *           "index": 1,
 *           "startedDate": "2024-01-22T14:00:53.904Z"
 *         }
 *       ],
 *       "formData": {
 *         "submissionData": {}
 *       },
 *       "lastPaymentStatus": "NOT_APPLICABLE",
 *       "orderMethod": "UNKNOWN",
 *       "pausePeriods": [],
 *       "planDescription": "",
 *       "planId": "aa0d8e0e-99ad-4c95-ac48-4955e37956c5",
 *       "planName": "Default",
 *       "planPrice": "0",
 *       "priceDetails": {
 *         "currency": "EUR",
 *         "discount": "0",
 *         "planPrice": "0",
 *         "singlePaymentUnlimited": true,
 *         "subtotal": "0.00",
 *         "total": "0"
 *       },
 *       "pricing": {
 *         "prices": [
 *           {
 *             "duration": {
 *               "cycleFrom": 1,
 *               "numberOfCycles": 1
 *             },
 *             "price": {
 *               "currency": "EUR",
 *               "discount": "0",
 *               "fees": [],
 *               "proration": "0",
 *               "subtotal": "0.00",
 *               "total": "0"
 *             }
 *           }
 *         ],
 *         "singlePaymentUnlimited": true
 *       },
 *       "priceDetails": {
 *         "currency": "EUR",
 *         "discount": "0",
 *         "planPrice": "0",
 *         "singlePaymentUnlimited": true,
 *         "subtotal": "0.00",
 *         "total": "0"
 *       },
 *       "startDate": "2024-01-22T14:00:53.904Z",
 *       "status": "ACTIVE",
 *       "statusNew": "ACTIVE",
 *       "subscriptionId": "19276032-d06f-4931-962f-79486d8b6bc0",
 *       "type": "ONLINE"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 1,
 *     "hasNext": false,
 *     "offset": 0,
 *     "total": 1
 *   }
 * }
 */
```

### List pricing plan orders
```javascript
import { orders } from '@wix/pricing-plans';

export async function myManagementListOrdersFunction() {
  try {
    const ordersList = await orders.managementListOrders();

    return ordersList;
  } catch (error){
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to:
 * {
 *   "orders": [
 *     {
 *       "_createdDate": "2024-01-22T14:00:53.904Z",
 *       "_id": "14fac8ae-506e-4e7b-84d4-e9b094d0ddca",
 *       "_updatedDate": "2024-01-22T14:00:54.772Z",
 *       "buyer": {
 *         "contactId": "f5691fc2-0674-4eee-92c5-da06a05981a5",
 *         "memberId": "f5691fc2-0674-4eee-92c5-da06a05981a5"
 *       },
 *       "currentCycle": {
 *         "index": 1,
 *         "startedDate": "2024-01-22T14:00:53.904Z"
 *       },
 *       "cycles": [
 *         {
 *           "index": 1,
 *           "startedDate": "2024-01-22T14:00:53.904Z"
 *         }
 *       ],
 *       "formData": {
 *         "submissionData": {}
 *       },
 *       "lastPaymentStatus": "NOT_APPLICABLE",
 *       "orderMethod": "UNKNOWN",
 *       "pausePeriods": [],
 *       "planDescription": "",
 *       "planId": "aa0d8e0e-99ad-4c95-ac48-4955e37956c5",
 *       "planName": "Default",
 *       "planPrice": "0",
 *       "priceDetails": {
 *         "currency": "EUR",
 *         "discount": "0",
 *         "planPrice": "0",
 *         "singlePaymentUnlimited": true,
 *         "subtotal": "0.00",
 *         "total": "0"
 *       },
 *       "pricing": {
 *         "prices": [
 *           {
 *             "duration": {
 *               "cycleFrom": 1,
 *               "numberOfCycles": 1
 *             },
 *             "price": {
 *               "currency": "EUR",
 *               "discount": "0",
 *               "fees": [],
 *               "proration": "0",
 *               "subtotal": "0.00",
 *               "total": "0"
 *             }
 *           }
 *         ],
 *         "singlePaymentUnlimited": true
 *       },
 *       "priceDetails": {
 *         "currency": "EUR",
 *         "discount": "0",
 *         "planPrice": "0",
 *         "singlePaymentUnlimited": true,
 *         "subtotal": "0.00",
 *         "total": "0"
 *       },
 *       "startDate": "2024-01-22T14:00:53.904Z",
 *       "status": "ACTIVE",
 *       "statusNew": "ACTIVE",
 *       "subscriptionId": "19276032-d06f-4931-962f-79486d8b6bc0",
 *       "type": "ONLINE"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 1,
 *     "hasNext": false,
 *     "offset": 0,
 *     "total": 1
 *   }
 * }
 */
```

### managementListOrders (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { orders } from '@wix/pricing-plans';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { orders },
  // Include the auth strategy and host as relevant
});


async function managementListOrders(options) {
  const response = await myWixClient.orders.managementListOrders(options);
};
```

---