---
title: "Create a transaction"
method: POST
path: "/tracker/transaction"
tags: ["Transactions"]
---

# Create a transaction

`POST /tracker/transaction`

Create a new transaction for a subscriber.

## Request body

- object
  - `transaction` object, required — Transaction details.
    - `order_id` string, required — Your unique transaction ID.
    - `email` string, required — Subscriber's email address.
    - `shop` string — Name of your shop, used in conditionals in the app. Case sensitive. An empty value results in not being able to select the shop in segments.
    - `amount` number — Total amount including tax and shipping.
    - `tax` number — Tax amount only.
    - `shipping` number — Shipping amount only.
    - `city` string — Delivery city.
    - `county` string — Delivery county.
    - `country` string — Delivery country.
    - `timestamp` integer — Unix timestamp of the transaction.
    - `props` union — Optional properties, used in conditionals.
      - string
      - object
    - `status` string — Transaction status. Accepted values: `processing`, `canceled`, `pending`, `completed`, `null`.
  - `transaction_items` object[], required — Array of transaction items.
    - `code` string — Product code.
    - `title` string — Product name.
    - `category` string — Deprecated. Use `categories` instead.
    - `categories` unknown[] — List of product categories. Limited to 100 characters per category and 20 categories per item. Currently not visible in the Ecomail app — use the `category` parameter for now.
      - unknown
    - `price` number — Total price for the given quantity.
    - `amount` number — Quantity of the product.
    - `tags` unknown[] — Optional item tags. Limited to 5000 characters per account.
      - unknown

## Response `200`

OK

- object
  - `order_id` string
  - `email` string
  - `shop` string
  - `amount` integer
  - `timestamp` string
  - `id` integer
  - `status` string

## Other responses

- `422` — Unprocessable Entity

---

[API](https://skmtc.dev/ecomail/apis/ecomail-api.md) · [All operations](https://skmtc.dev/ecomail/apis/ecomail-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ecomail/ecomail-api/revisions/31b5789931fe/schema)
