> 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

# Package: ticketing

# Namespace: orders

# Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/events/registration/ticketing/orders/order-confirmed.md

# Webhook Permissions Scopes IDs:
Read Basic Events Order Info: SCOPE.DC-EVENTS.READ-BASIC-ORDERS

## REST API

### Schema

```
Webhook: Order Confirmed
Description: 
Payload: OrderConfirmed
  - name: timestamp | type: string | description: Date and time the order was confirmed.
  - name: language | type: string | description: Site language when the order was initiated.
  - name: silent | type: boolean | description: Notifications silenced for this domain event.
  - name: locale | type: string | description: Locale in which the order was created.
  - name: eventId | type: string | description: Event GUID to which the order belongs.
  - name: orderNumber | type: string | description: Unique order number.
  - name: contactId | type: string | description: Contact GUID associated with the order.
  - name: memberId | type: string | description: Member GUID associated with the order.
  - name: created | type: string | description: Date and time the order was created.
  - name: updated | type: string | description: Date and time the order was updated.
  - name: firstName | type: string | description: Buyer first name.
  - name: lastName | type: string | description: Buyer last name.
  - name: email | type: string | description: Buyer email address.
  - name: checkoutForm | type: FormResponse | description: Checkout form response.
     - name: inputValues | type: array<InputValue> | description: Form field inputs.
        - name: inputName | type: string | description: Form field input name.
        - name: value | type: string | description: Form field value.
        - name: values | type: array<string> | description: Form field values.
  - name: status | type: OrderStatus | description: Order status.
     - enum:
     -     NA_ORDER_STATUS: Order status isn't available for this request fieldset.
     -     FREE: Order is confirmed, no payment is required.
     -     PENDING: Order was paid, but the payment gateway suspended the payment.
     -     PAID: Order is paid.
     -     OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`.
     -     INITIATED: Order is waiting for payment at the cashier.
     -     CANCELED: Order is canceled.
     -     DECLINED: Order payment is declined.
     -     AUTHORIZED: Order payment is authorized.
     -     VOIDED: Order payment is voided.
     -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
  - name: method | type: string | description: Payment method used for paid tickets purchase, i.e. "payPal", "creditCard", etc.
  - name: tickets | type: array<Ticket> | description: Tickets (generated after payment).
     - name: ticketNumber | type: string | description: Unique issued ticket number.
     - name: ticketDefinitionId | type: string | description: Ticket definition GUID.
     - name: checkIn | type: CheckIn | description: Ticket check-in.
        - name: created | type: string | description: Time of a ticket's check-in.
     - name: price | type: Money | description: Ticket price.
        - name: currency | type: string | description: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `USD`.
        - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative.
     - name: archived | type: boolean | description: Whether ticket is archived.
     - name: firstName | type: string | description: Guest first name.
     - name: lastName | type: string | description: Guest last name.
     - name: email | type: string | description: Guest email.
     - name: contactId | type: string | description: Contact GUID associated with this ticket.
     - name: confirmed | type: boolean | description: Whether ticket is confirmed
     - name: memberId | type: string | description: Member GUID associated with this ticket.
     - name: form | type: FormResponse | description: Ticket form response (only assigned tickets contain separate forms).
     - name: ticketName | type: string | description: Ticket name.
     - name: anonymized | type: boolean | description: Anonymized tickets no longer contain personally identifiable information (PII).
     - name: onlineConferencingLogin | type: OnlineConferencingLogin | description: URL and password to online conference
        - name: link | type: string | description: Link URL to the online conference.
        - name: password | type: string | description: Password for the online conference.
     - name: seatId | type: string | description: Seat GUID associated with this ticket.
     - name: canceled | type: boolean | description: Whether ticket is canceled.
  - name: invoice | type: Invoice | description: Invoice.
     - name: items | type: array<Item> | description: 
        - name: id | type: string | description: Unique line item GUID.
        - name: quantity | type: integer | description: Line item quantity.
        - name: name | type: string | description: Line item name.
        - name: price | type: Money | description: Line item price.
        - name: total | type: Money | description: Total price for line items. Always equal to price * quantity.
        - name: discount | type: Discount | description: Discount applied to the line item.
           - name: amount | type: Money | description: Total discount amount.
           - name: afterDiscount | type: Money | description: Total sum after the discount.
           - name: discounts | type: array<DiscountItem> | description: Discount items.
              - ONE-OF:
                 - name: coupon | type: CouponDiscount | description: Coupon discount.
                    - name: name | type: string | description: Discount coupon name. **Deprecated:** Use `invoice.discounts.coupon.name` instead.
                    - name: code | type: string | description: Discount coupon code. **Deprecated:** Use `invoice.discounts.coupon.code` instead.
                    - name: couponId | type: string | description: Discount coupon GUID. **Deprecated:** Use `invoice.discounts.coupon.couponId` instead.
                 - name: paidPlan | type: PaidPlanDiscount | description: Pricing plan discount.
                    - ONE-OF:
                       - name: percentDiscount | type: PercentDiscount | description: Discount by percentage applied to tickets.
                          - name: rate | type: string | description: Percent rate.
                          - name: quantityDiscounted | type: integer | description: Number of discounted tickets.
                    - name: name | type: string | description: Name of pricing plan.
              - name: amount | type: Money | description: Total discount amount.
        - name: tax | type: Tax | description: Tax applied to the item.
           - name: type | type: TaxType | description: Tax type.
                 - enum:
                 -     INCLUDED: Tax is included in the ticket price.
                 -     ADDED: Tax is added to the order at the checkout.
                 -     ADDED_AT_CHECKOUT: Tax is added to the final total at the checkout.
           - name: name | type: string | description: Tax name.
           - name: rate | type: string | description: Tax rate.
           - name: taxable | type: Money | description: Taxable amount.
           - name: amount | type: Money | description: Total tax amount.
        - name: fees | type: array<Fee> | description: Wix ticket service fee on this item's tickets. The fee on additional fees is only in the invoice `fees`.
           - name: name | type: FeeName | description: Fee identifier.
                 - enum:
                 -     WIX_FEE: Wix ticket service fee charges applied to the line item.
           - name: type | type: FeeType | description: How fee is calculated.
                 - enum:
                 -     FEE_ADDED: Fee is added to the ticket price at checkout.
                 -     FEE_INCLUDED: Seller absorbs the fee. It's deducted from the ticket price.
                 -     FEE_ADDED_AT_CHECKOUT: Fee is added to the ticket price at checkout.
           - name: rate | type: string | description: Fee rate.
           - name: amount | type: Money | description: Total amount of fee charges.
     - name: discount | type: Discount | description: Discount applied to a cart.
     - name: tax | type: Tax | description: Tax applied to a cart.
     - name: subTotal | type: Money | description: Total cart amount before discount, tax, and fees.
     - name: grandTotal | type: Money | description: Total amount of a cart after discount, tax, and fees. Grand total is calculated in the following order: 1. Total prices of all items in the cart are calculated. 2. Discount is subtracted from the cart, if applicable. 3. Tax on tickets is added, if applicable. 4. Wix ticket service fee paid by the buyer is added. 5. Additional fees configured by the event organizer (`additionalFees`) are added, including their tax.
     - name: fees | type: array<Fee> | description: Wix ticket service fees on the order. The `FEE_INCLUDED` entries, which the organizer absorbs, also hold the fee on `additionalFees`.
     - name: revenue | type: Money | description: Total revenue: `grandTotal` minus the Wix ticket service fees in `fees` and any amount paid by gift card, never below 0. `additionalFees` stay in revenue. Taxes and payment provider fees aren't deducted.
     - name: previewUrl | type: string | description: Invoice preview URL. Only returned if the order is paid.
     - name: additionalFees | type: array<AppliedAdditionalFee> | description: Additional fees configured by the event organizer, in display order. Included in `grandTotal`, `tax` and `revenue`. The Wix ticket service fee on them is part of the `FEE_INCLUDED` entries in `fees`.
        - name: appliedFeeId | type: string | description: Applied fee GUID, assigned once when the order is created.
        - name: name | type: string | description: Fee name shown to buyers.
        - name: amount | type: Money | description: Total amount charged for this fee, including tax.
        - name: tax | type: Tax | description: Tax applied to the fee. Not returned when no tax applies.
  - name: reservationId | type: string | description: Reservation GUID associated with the order.

```

### Examples


```curl
{
  "timestamp": "2020-04-28T12:23:57.154Z",
  "eventId": "566e7be9-1410-4095-ae7a-349a4ac95c6b",
  "orderNumber": "FMXC-BZG3-OT",
  "contactId": "eea3ac0f-f9e6-4ed3-a135-99743c8e90b8",
  "memberId": "b272b0bb-d013-415a-8461-e8a175fe8dc6",
  "created": "2020-04-28T12:23:51.523Z",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@somedomain.com",
  "status": "PAID",
  "method": "payPal",
  "checkoutForm": {
    "inputValues": [
      {
        "inputName": "firstName",
        "value": "John"
      },
      {
        "inputName": "lastName",
        "value": "Doe"
      },
      {
        "inputName": "email",
        "value": "john.doe@somedomain.com"
      }
    ]
  },
  "tickets": [
    {
      "ticketNumber": "FMXC-BZG3-OT021",
      "ticketDefinitionId": "d72874cb-012a-4ad2-afbb-57fe8cf1e308",
      "price": {
        "amount": "123.00",
        "currency": "USD"
      },
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@somedomain.com",
      "contactId": "eea3ac0f-f9e6-4ed3-a135-99743c8e90b8",
      "memberId": "b272b0bb-d013-415a-8461-e8a175fe8dc6",
      "confirmed": true,
      "form": {
        "inputValues": [
          {
            "inputName": "custom",
            "value": "Another comment"
          },
          {
            "inputName": "email",
            "value": "john.doe@somedomain.com"
          },
          {
            "inputName": "lastName",
            "value": "Doe"
          },
          {
            "inputName": "firstName",
            "value": "John"
          },
          {
            "inputName": "date",
            "value": "2020-04-28"
          },
          {
            "inputName": "comment",
            "value": "Comment"
          },
          {
            "inputName": "address",
            "values": [
              "Wix Playground, 100 Gansevoort St",
              "New York City",
              "New York",
              "USA",
              "NY 10014"
            ]
          },
          {
            "inputName": "phone",
            "value": "(555) 555-1234"
          }
        ]
      }
    },
    {
      "ticketNumber": "FMXC-BZG3-OT041",
      "ticketDefinitionId": "9c3dc432-f1a6-408f-82d8-4f64c7ff581b",
      "price": {
        "amount": "0.00",
        "currency": "USD"
      },
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "jane.doe@somedomain.com",
      "contactId": "e11af3d4-c205-4d3a-b687-58d4dda78a6c",
      "memberId": "62bc4004-548c-46ad-a699-55ef307273e3",
      "confirmed": true,
      "form": {
        "inputValues": [
          {
            "inputName": "custom",
            "value": "Another comment"
          },
          {
            "inputName": "email",
            "value": "jane.doe@somedomain.com"
          },
          {
            "inputName": "lastName",
            "value": "Doe"
          },
          {
            "inputName": "firstName",
            "value": "Jane"
          },
          {
            "inputName": "date",
            "value": "2020-04-28"
          },
          {
            "inputName": "comment",
            "value": "Comment"
          },
          {
            "inputName": "address",
            "values": [
              "Wix Playground, 100 Gansevoort St",
              "New York City",
              "New York",
              "USA",
              "NY 10014"
            ]
          },
          {
            "inputName": "phone",
            "value": "(555) 555-1234"
          }
        ]
      }
    }
  ],
  "invoice": {
    "items": [
      {
        "id": "d72874cb-012a-4ad2-afbb-57fe8cf1e308",
        "quantity": 1,
        "name": "VIP",
        "price": {
          "amount": "123.00",
          "currency": "USD"
        },
        "total": {
          "amount": "123.00",
          "currency": "USD"
        },
        "fees": [
          {
            "type": "FEE_INCLUDED",
            "rate": "2.5",
            "amount": {
              "amount": "3.08",
              "currency": "USD"
            }
          }
        ]
      },
      {
        "id": "9c3dc432-f1a6-408f-82d8-4f64c7ff581b",
        "quantity": 1,
        "name": "Free",
        "price": {
          "amount": "0.00",
          "currency": "USD"
        },
        "total": {
          "amount": "0.00",
          "currency": "USD"
        },
        "fees": [
          {
            "rate": "2.5",
            "amount": {
              "amount": "0.00",
              "currency": "USD"
            }
          }
        ]
      }
    ],
    "fees": [
      {
        "rate": "2.5",
        "amount": {
          "amount": "0.00",
          "currency": "USD"
        }
      },
      {
        "type": "FEE_INCLUDED",
        "rate": "2.5",
        "amount": {
          "amount": "3.08",
          "currency": "USD"
        }
      }
    ],
    "subTotal": {
      "amount": "123.00",
      "currency": "USD"
    },
    "grandTotal": {
      "amount": "123.00",
      "currency": "USD"
    },
    "revenue": {
      "amount": "119.92",
      "currency": "USD"
    }
  }
}

```

---

## JavaScript SDK

### Schema

```
Webhook: onOrderConfirmed
Description: 
Payload: OrderConfirmedEnvelope
  - name: data | type: OrderConfirmed | description: none
     - name: timestamp | type: Date | description: Date and time the order was confirmed.
     - name: language | type: string | description: Site language when the order was initiated.
     - name: silent | type: boolean | description: Notifications silenced for this domain event.
     - name: locale | type: string | description: Locale in which the order was created.
     - name: eventId | type: string | description: Event GUID to which the order belongs.
     - name: orderNumber | type: string | description: Unique order number.
     - name: contactId | type: string | description: Contact GUID associated with the order.
     - name: memberId | type: string | description: Member GUID associated with the order.
     - name: created | type: Date | description: Date and time the order was created.
     - name: updated | type: Date | description: Date and time the order was updated.
     - name: firstName | type: string | description: Buyer first name.
     - name: lastName | type: string | description: Buyer last name.
     - name: email | type: string | description: Buyer email address.
     - name: checkoutForm | type: FormResponse | description: Checkout form response.
        - name: inputValues | type: array<InputValue> | description: Form field inputs.
           - name: inputName | type: string | description: Form field input name.
           - name: value | type: string | description: Form field value.
           - name: values | type: array<string> | description: Form field values.
     - name: status | type: OrderStatus | description: Order status.
         - enum:
         -     NA_ORDER_STATUS: Order status isn't available for this request fieldset.
         -     FREE: Order is confirmed, no payment is required.
         -     PENDING: Order was paid, but the payment gateway suspended the payment.
         -     PAID: Order is paid.
         -     OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`.
         -     INITIATED: Order is waiting for payment at the cashier.
         -     CANCELED: Order is canceled.
         -     DECLINED: Order payment is declined.
         -     AUTHORIZED: Order payment is authorized.
         -     VOIDED: Order payment is voided.
         -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
     - name: method | type: string | description: Payment method used for paid tickets purchase, i.e. "payPal", "creditCard", etc.
     - name: tickets | type: array<Ticket> | description: Tickets (generated after payment).
        - name: ticketNumber | type: string | description: Unique issued ticket number.
        - name: ticketDefinitionId | type: string | description: Ticket definition GUID.
        - name: checkIn | type: CheckIn | description: Ticket check-in.
           - name: created | type: Date | description: Time of a ticket's check-in.
        - name: price | type: Money | description: Ticket price.
           - name: currency | type: string | description: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `USD`.
           - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative.
        - name: archived | type: boolean | description: Whether ticket is archived.
        - name: firstName | type: string | description: Guest first name.
        - name: lastName | type: string | description: Guest last name.
        - name: email | type: string | description: Guest email.
        - name: contactId | type: string | description: Contact GUID associated with this ticket.
        - name: confirmed | type: boolean | description: Whether ticket is confirmed
        - name: memberId | type: string | description: Member GUID associated with this ticket.
        - name: form | type: FormResponse | description: Ticket form response (only assigned tickets contain separate forms).
        - name: ticketName | type: string | description: Ticket name.
        - name: anonymized | type: boolean | description: Anonymized tickets no longer contain personally identifiable information (PII).
        - name: onlineConferencingLogin | type: OnlineConferencingLogin | description: URL and password to online conference
           - name: link | type: string | description: Link URL to the online conference.
           - name: password | type: string | description: Password for the online conference.
        - name: seatId | type: string | description: Seat GUID associated with this ticket.
        - name: canceled | type: boolean | description: Whether ticket is canceled.
     - name: invoice | type: Invoice | description: Invoice.
        - name: items | type: array<Item> | description: 
           - name: _id | type: string | description: Unique line item GUID.
           - name: quantity | type: integer | description: Line item quantity.
           - name: name | type: string | description: Line item name.
           - name: price | type: Money | description: Line item price.
           - name: total | type: Money | description: Total price for line items. Always equal to price * quantity.
           - name: discount | type: Discount | description: Discount applied to the line item.
              - name: amount | type: Money | description: Total discount amount.
              - name: afterDiscount | type: Money | description: Total sum after the discount.
              - name: discounts | type: array<DiscountItem> | description: Discount items.
                 - ONE-OF:
                    - name: coupon | type: CouponDiscount | description: Coupon discount.
                       - name: name | type: string | description: Discount coupon name. **Deprecated:** Use `invoice.discounts.coupon.name` instead.
                       - name: code | type: string | description: Discount coupon code. **Deprecated:** Use `invoice.discounts.coupon.code` instead.
                       - name: couponId | type: string | description: Discount coupon GUID. **Deprecated:** Use `invoice.discounts.coupon.couponId` instead.
                    - name: paidPlan | type: PaidPlanDiscount | description: Pricing plan discount.
                       - ONE-OF:
                          - name: percentDiscount | type: PercentDiscount | description: Discount by percentage applied to tickets.
                             - name: rate | type: string | description: Percent rate.
                             - name: quantityDiscounted | type: integer | description: Number of discounted tickets.
                       - name: name | type: string | description: Name of pricing plan.
                 - name: amount | type: Money | description: Total discount amount.
           - name: tax | type: Tax | description: Tax applied to the item.
              - name: type | type: TaxType | description: Tax type.
                     - enum:
                     -     INCLUDED: Tax is included in the ticket price.
                     -     ADDED: Tax is added to the order at the checkout.
                     -     ADDED_AT_CHECKOUT: Tax is added to the final total at the checkout.
              - name: name | type: string | description: Tax name.
              - name: rate | type: string | description: Tax rate.
              - name: taxable | type: Money | description: Taxable amount.
              - name: amount | type: Money | description: Total tax amount.
           - name: fees | type: array<Fee> | description: Wix ticket service fee on this item's tickets. The fee on additional fees is only in the invoice `fees`.
              - name: name | type: FeeName | description: Fee identifier.
                     - enum:
                     -     WIX_FEE: Wix ticket service fee charges applied to the line item.
              - name: type | type: FeeType | description: How fee is calculated.
                     - enum:
                     -     FEE_ADDED: Fee is added to the ticket price at checkout.
                     -     FEE_INCLUDED: Seller absorbs the fee. It's deducted from the ticket price.
                     -     FEE_ADDED_AT_CHECKOUT: Fee is added to the ticket price at checkout.
              - name: rate | type: string | description: Fee rate.
              - name: amount | type: Money | description: Total amount of fee charges.
        - name: discount | type: Discount | description: Discount applied to a cart.
        - name: tax | type: Tax | description: Tax applied to a cart.
        - name: subTotal | type: Money | description: Total cart amount before discount, tax, and fees.
        - name: grandTotal | type: Money | description: Total amount of a cart after discount, tax, and fees. Grand total is calculated in the following order: 1. Total prices of all items in the cart are calculated. 2. Discount is subtracted from the cart, if applicable. 3. Tax on tickets is added, if applicable. 4. Wix ticket service fee paid by the buyer is added. 5. Additional fees configured by the event organizer (`additionalFees`) are added, including their tax.
        - name: fees | type: array<Fee> | description: Wix ticket service fees on the order. The `FEE_INCLUDED` entries, which the organizer absorbs, also hold the fee on `additionalFees`.
        - name: revenue | type: Money | description: Total revenue: `grandTotal` minus the Wix ticket service fees in `fees` and any amount paid by gift card, never below 0. `additionalFees` stay in revenue. Taxes and payment provider fees aren't deducted.
        - name: previewUrl | type: string | description: Invoice preview URL. Only returned if the order is paid.
        - name: additionalFees | type: array<AppliedAdditionalFee> | description: Additional fees configured by the event organizer, in display order. Included in `grandTotal`, `tax` and `revenue`. The Wix ticket service fee on them is part of the `FEE_INCLUDED` entries in `fees`.
           - name: appliedFeeId | type: string | description: Applied fee GUID, assigned once when the order is created.
           - name: name | type: string | description: Fee name shown to buyers.
           - name: amount | type: Money | description: Total amount charged for this fee, including tax.
           - name: tax | type: Tax | description: Tax applied to the fee. Not returned when no tax applies.
     - name: reservationId | type: string | description: Reservation GUID associated with the order.
  - name: metadata | type: BaseEventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.

```

### Examples


```javascript
import { orders } from '@wix/events';

orders.onOrderConfirmed((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { orders } from '@wix/events';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      orders,
    },
});

wixClient.orders.onOrderConfirmed((event) => {
    // handle your event here
});
```

---