> ## Documentation Index
> Fetch the complete documentation index at: https://dev.smile.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Order object

When sending order events to Smile, the following fields are used to represent and describe the order.

<ParamField body="external_id" type="string">
  The unique id of the order in your system. This should never change for a given order.
</ParamField>

<ParamField body="subtotal" type="number">
  The order's subtotal (before tax, discounts, shipping, etc).
</ParamField>

<ParamField body="grand_total" type="number">
  The order's grand total (including tax, discounts, shipping, etc).
</ParamField>

<ParamField body="rewardable_total" type="number">
  The value of the order that should be rewarded with points. This should be less than or equal to the `grand_total`. If you have products that should not be rewarded, you can deduct them from the `rewardable_total` so they are not given points. If we receive a negative value for `rewardable_total` we will change it to 0 as we don't support a negative `rewardable_total`.
</ParamField>

<ParamField body="external_created_at" type="string<date-time>">
  The date the order was created in your system.
</ParamField>

<ParamField body="external_updated_at" type="string<date-time>">
  The date the order was last updated in your system.
</ParamField>

<ParamField body="payment_status" type="string">
  The status of the order's payment, which determines whether rewards will be issued or revoked. Possible values:

  * `paid` - The order has been paid and should be rewarded.
  * `refunded` - The order has been refunded and any rewards should be revoked.
  * `null` - The order has yet to be paid and should not yet be rewarded.
</ParamField>

<ParamField body="coupons" type="array">
  An array of coupons that were used on the order. Used for tracking referrals and loyalty program ROI metrics. Each coupon object in the array contains a `code` field (string) representing the coupon code.
</ParamField>

<ParamField body="customer" type="object">
  The customer that placed the order. If the order was placed by a guest, set this value to `null`. The customer object should contain the customer's information (see the [custom customer object](/guides/deprecated/custom-platform/custom-backend-int/custom-customer-events/custom-customer-object) for details).
</ParamField>

<Panel>
  ```json Example theme={null}
  {
    "external_id": "100",
    "subtotal": 200,
    "grand_total": 230,
    "rewardable_total": 200,
    "external_created_at": "2023-11-19T21:19:30.559Z",
    "external_updated_at": "2023-12-03T11:17:35.159Z",
    "payment_status": "paid",
    "coupons": [
      {
        "code": "5off-j2n5jduwjttj"
      }
    ],
    "customer": {}
  }
  ```
</Panel>
