---
title: "Order Transaction"
method: POST
path: "/events/order-transaction"
tags: ["Send Event"]
---

# Order Transaction

`POST /events/order-transaction`

Records that a user has completed an order transaction. Must be sent in addition to the page view event.

## Request body

- EventsOrderTransactionEvent
  - `identification` EventsIdentification, required
    - `sessionIdentification` EventsSessionIdentification, required — Metadata representing a users session. Allows Wunderkind to connect multiple events into a single session. NOTE: Exactly one of wunderkindVisitorIdentifier or partnerVisitorId must be provided.
      - `wunderkindVisitorIdentifier` EventsWunderkindVisitorIdentifier
        - `deviceId` string, int64, required — Wunderkind device identifier as returned onsite with `bouncex.cookie.did`
        - `visitId` string, required — Wunderkind visit identifier as returned onsite with `bouncex.cookie.vid`
      - `partnerVisitorId` string — Generate and store a random 16 character alphanumeric identifier for the visitor if not already present. This identifier should be consistent for repeat visitors.
      - `smarterhqVisitorIdentifier` EventsSmarterHQVisitorIdentifier
        - `loiid` string, required — SmarterHQ loiid
        - `sessionId` string, required — SmarterHQ session id
    - `userIdentification` EventsUserIdentification, required — Metadata representing the user behind the session.
      - `email` string — Email address. This is preferred over the SHA256 hashed email.
      - `emailSha256` string — Email address (SHA256 hashed). Ensure to lowercase the email before hashing.
      - `phone` string — Phone Number - please pass in the format +(country code)(phone number). This is preferred over the SHA256 hashed phone number.
      - `phoneSha256` string — Phone Number (SHA256 hashed)
      - `partnerId` string — Partner identifier - An identifier for the partner that owns the user
      - `additionalIdentifiers` object — Additional identifiers
      - `source` string — Source of the user
    - `deviceIdentification` EventsDeviceIdentification, required — Metadata representing the device used by the user.
      - `ipAddress` string, required — The IP address of the user (IPv4 or IPv6)
      - `userAgent` string — The user agent of the browser
    - `source` 'web' | 'app' | 'retail', required
    - `profile` EventsProfile
      - `firstName` string — The first name of the user
      - `lastName` string — The last name of the user
      - `address` string — The address of the user
      - `city` string — The city of the user
      - `state` string — The state of the user
      - `zip` string — The zip code of the user
      - `country` string — The country of the user
    - `location` EventsLocation
      - `timezoneOffset` integer — The UTC timezone offset of the user
      - `latitude` number, float — The latitude of the user
      - `longitude` number, float — The longitude of the user
  - `orderId` string, required — The unique identifier for the order as defined by the partner
  - `additionalOrderIds` object, required — Additional order identifiers as defined by the partner. Can be useful if you have a printable order number for the customer, and a distinct one for your backend.
  - `total` EventsMoney, required
    - `amount` number, double, required — The amount of money
    - `currency` string, required — The currency code
  - `shipping` EventsMoney, required
    - `amount` number, double, required — The amount of money
    - `currency` string, required — The currency code
  - `tax` EventsMoney, required
    - `amount` number, double, required — The amount of money
    - `currency` string, required — The currency code
  - `discounts` EventsMoney, required
    - `amount` number, double, required — The amount of money
    - `currency` string, required — The currency code
  - `couponCodes` string[], required — The coupon codes applied to the order
  - `items` EventsOrderLineItem[], required — The items in the order
    - `itemId` string, required — The unique identifier for the item as defined by the partner. This represents the parent identifier for the item. For example, if you sell similar shirts, they may have the same parent id, but a different sku for each size / color combination
    - `sku` string, required — The SKU of the item as defined by the partner. This represents the child identifier for the item. For example, if you sell similar shirts, they may have the same parent id, but a different sku for each size / color combination
    - `unitPrice` EventsMoney, required
      - `amount` number, double, required — The amount of money
      - `currency` string, required — The currency code
    - `quantity` integer, required — The quantity of the item in the order
  - `extra` object, required — Any additional attributes, may be passed empty.
  - `agent` string, required — The agent from which the event was sent
  - `timestamp` string, int64, required — The timestamp of the event in milliseconds since the unix epoch
  - `websiteId` string, int64, required — The unique identifier for the website as provided by Wunderkind

## Response `200`

A successful response.

- EventsSubmitEventResponse
  - `success` boolean — Success
  - `message` string — Message

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.dev/wunderkind/apis/wunderhook.md) · [All operations](https://skmtc.dev/wunderkind/apis/wunderhook/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/wunderkind/wunderhook/revisions/a25138bc98f4/schema)
