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

# Track Checkout Started

> Track a started checkout for abandoned checkout automations

Track a started checkout from any e-commerce platform. Triggers the `ecommerce.checkout_started` event, which can power abandoned checkout automations (start a sequence on `ecommerce.checkout_started` with a delay, and stop it on `ecommerce.order_placed`).

## Request Body

<ParamField body="checkoutId" type="string" required>
  Unique checkout identifier in your platform.
</ParamField>

<ParamField body="totalCents" type="integer">
  Checkout total in cents.
</ParamField>

<ParamField body="currency" type="string">
  ISO 4217 currency code (e.g. `USD`).
</ParamField>

<ParamField body="checkoutUrl" type="string">
  URL the customer can use to resume the checkout. Available in emails as
  `{{event.checkoutUrl}}`.
</ParamField>

<ParamField body="customer" type="object" required>
  The customer who started the checkout. Requires `email`; also accepts
  `externalId`, `firstName`, `lastName`, and `attributes`.
</ParamField>

<ParamField body="items" type="array">
  Checkout line items. Each item has `productId` (required), `title`
  (required), `quantity` (required), `variantId`, `sku`, `variantTitle`, and
  `priceCents`.
</ParamField>

<ParamField body="properties" type="object">
  Extra event properties to attach to the triggered event.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/checkouts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "checkoutId": "checkout-abc123",
    "totalCents": 8850,
    "currency": "USD",
    "checkoutUrl": "https://store.example.com/checkout/abc123",
    "customer": { "email": "buyer@example.com" },
    "items": [
      {
        "productId": "SKU-PROTEIN-1KG",
        "title": "Protein Powder",
        "quantity": 1,
        "priceCents": 8850
      }
    ]
  }'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "checkoutId": "checkout-abc123",
    "subscriberId": "sub_abc123",
    "eventId": "evt_xyz789"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized"
  }
  ```

  ```json 422 theme={null}
  {
    "success": false,
    "error": "Validation error: checkoutId is required"
  }
  ```

  ```json 500 theme={null}
  {
    "success": false,
    "error": "Internal server error"
  }
  ```
</ResponseExample>
