---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://appmetrica.yandex.by/docs/en/sdk/ios/analytics/swift/ECommerceOrder.md
  - https://appmetrica.yandex.by/docs/ru/sdk/ios/analytics/swift/ECommerceOrder.md
  - href: en/sdk/ios/analytics/swift/ECommerceOrder.md
    type: text/markdown
    title: Markdown version
  - href: ../../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.by/docs/en/llms.txt

# ECommerceOrder class

This class contains order information.

## Instance methods {#instance_summary}

#|
|| [init(identifier:cartItems:)](#method_initWithIdentifier__cartItems) | Initializes the instance of the `ECommerceOrder` class with order information. ||
|| [init(identifier:cartItems:payload:)](#method_initWithIdentifier__cartItems__payload) | Initializes the instance of the `ECommerceOrder` class with order information. ||
|#

## Properties {#property_summary}

#|
|| [identifier](#property_identifier) | Order ID. Allowed size: Up to 100 characters. ||
|| [cartItems](#property_cartItems) | A list of items in the cart. ||
|| [payload](#property_payload) | Additional information about the order. ||
|#

## Method descriptions {#method_detail}

### init(identifier:cartItems:) {#method_initWithIdentifier__cartItems}

```swift translate=no
init(identifier: String, cartItems: [ECommerceCartItem])
```

Initializes the instance of the `ECommerceOrder` class with order information.

**Parameters:**

#|
|| `identifier` | Order ID. Allowed size: Up to 100 characters. ||
|| `cartItems` | A list of items in the cart. ||
|#

**Returns:**

The `ECommerceOrder` class instance.

### init(identifier:cartItems:payload:) {#method_initWithIdentifier__cartItems__payload}

```swift translate=no
init(identifier: String, cartItems: [ECommerceCartItem], payload: [String: String]?)
```

Initializes the instance of the `ECommerceOrder` class with order information.

**Parameters:**

#|
|| `identifier` | Order ID. Allowed size: Up to 100 characters. ||
|| `cartItems` | A list of items in the cart. ||
|| `payload` | Additional information about the order. ||
|#

**Returns:**

The `ECommerceOrder` class instance.

## Property descriptions {#property_detail}

### identifier {#property_identifier}

`var identifier: String { get }`

Order ID. Allowed size: Up to 100 characters.

### cartItems {#property_cartItems}

`var cartItems: [ECommerceCartItem] { get }`

A list of items in the cart.

### payload {#property_payload}

`var payload: [String: String]? { get }`

Additional information about the order. Acceptable sizes:

- The total `payload` size: Up to 20 KB.
- The `key` size: Up to 100 characters.
- The `value` size: Up to 1000 characters.
