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

# initiate_checkout Event

> Track when a visitor starts checkout

Fires when a visitor starts checkout.

## Example

```javascript theme={null}
window._upstack('track', 'initiate_checkout', {
  // Standard parameters
  value: 69.98,
  currency: 'USD',
  items: [{
    id: '8012345678',
    variant: '44120033',
    variantName: 'Blue / Medium',
    name: 'Classic Cotton Tee',
    sku: 'TEE-BLU-M',
    price: 34.99,
    quantity: 2,
    brand: 'Example Brand',
    category: 'Apparel',
    url: 'https://example.com/products/classic-tee',
    imageUrl: 'https://example.com/images/classic-tee.jpg'
  }],
  cartId: 'cart_5521',
  coupon: 'SAVE10',

  // User data
  email: 'jane@example.com',

  // Custom data
  checkoutType: 'express',
  loyaltyTier: 'gold'
});
```

> [!NOTE]
>
> Don't send `transactionId` on this event. It gives the event the same ID as the purchase, and one of them is dropped as a duplicate.

## Standard parameters

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| [`value`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/value) | `number` | Yes | `69.98` | Cart total. |
| [`currency`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/currency) | `string` | Yes | `USD` | ISO 4217 currency code. |
| [`items`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/items) | `Array<Item>` | Yes | [See below](#item-parameters) | The products in the event. |
| [`cartId`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/cart-id) | `string` | No | `cart_5521` | Your cart ID. |
| [`coupon`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/coupon) | `string` | No | `SAVE10` | Discount code used. |

## Item parameters

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| `id` | `string` | Yes | `8012345678` | Product ID. Must match the ID in your product catalogs. |
| `name` | `string` | Yes | `Classic Cotton Tee` | Product name. |
| `price` | `number` | Yes | `34.99` | Unit price. |
| `quantity` | `number` | Yes | `2` | Quantity. |
| `variant` | `string` | No | `44120033` | Variant ID, not a name. Must match your catalogs. |
| `variantName` | `string` | No | `Blue / Medium` | Variant name. |
| `sku` | `string` | No | `TEE-BLU-M` | SKU. |
| `brand` | `string` | No | `Example Brand` | Brand. |
| `category` | `string` | No | `Apparel` | Product category. |
| `url` | `string` | No | `https://example.com/products/classic-tee` | Product page URL. |
| `imageUrl` | `string` | No | `https://example.com/images/classic-tee.jpg` | Product image URL. |
| `discount` | `number` | No | `3.50` | Discount on this line. |
| `value` | `number` | No | `69.98` | Line total. |
| `content_type` | `string` | No | `product` | `product` or `product_group`. |

## User data

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| [`email`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/email) | `string` | Yes\* | `jane@example.com` | Email address. |
| [`phone`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/phone) | `string` | Yes\* | `+15551234567` | Phone number in E.164 format. |
| [`firstName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | No | `Jane` | First name. |
| [`lastName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | No | `Smith` | Last name. |

\* Required once you know it.

## Custom data

Examples for this event. See [how custom data works](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/custom-data.md).

| Name | Type | Example value | Description |
| - | - | - | - |
| `checkoutType` | `string` | `express` | The checkout used, such as `express` or `standard`. |
| `loyaltyTier` | `string` | `gold` | The customer's loyalty tier. |

## Related events

* [`view_cart`](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/view-cart) — A visitor views their cart.
* [`add_shipping_info`](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/add-shipping-info) — A customer enters their shipping details.
* [`add_payment_info`](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/add-payment-info) — A customer enters their payment details.
* [`purchase`](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/purchase) — A customer completes an order.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.