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

# Create a transaction

> Record a completed sale from a calculation. Returns a Transaction object.

Records a sale from a [calculation](https://docs.numeral.com/api-reference/v2026-11-01/endpoint/calculations). Create it after the customer pays and before the calculation expires (24 hours). The response is a [Transaction object](https://docs.numeral.com/v2026-11-01/objects/transactions.md#the-transaction-object).

> [!NOTE]
>
> **New in 2026-11-01:** every `tax_jurisdictions` row has a [`note`](https://docs.numeral.com/v2026-11-01/objects/calculations#notes). The transaction comes back in the shape of the `X-API-Version` you send now, whatever version the calculation was made on.

### Headers

**Authorization** `string` *required*

Your API key, as `Bearer <key>`.

**X-API-Version** `string` *required*

API version. Overrides your account's default version for this request.

### Body

**calculation\_id** `string` *required*

The `id` of the calculation to record.

**reference\_order\_id** `string` *required*

Your order ID. Must be unique across your transactions.

**transaction\_processed\_at** `integer`

When the sale was made, Unix **seconds**. Defaults to now.

**metadata** `object`

String key-value pairs, echoed back in the response.

### Returns

A [Transaction object](https://docs.numeral.com/v2026-11-01/objects/transactions.md#the-transaction-object). Errors are listed on the [Transactions page](https://docs.numeral.com/v2026-11-01/objects/transactions.md#errors).

```json 200 theme={null}
{
  "testmode": true,
  "id": "tr_1793039302001",
  "object": "tax.transaction",
  "calculation_id": "calc_1793039299123",
  "filing_currency_code": "USD",
  "customer_currency_code": "USD",
  "line_items": [
    {
      "line_item_id": "li_1793039299101",
      "product": {
        "reference_line_item_id": "widget",
        "reference_product_id": "default-general-merchandise",
        "reference_product_name": "Default GENERAL_MERCHANDISE Product",
        "product_tax_code": "GENERAL_MERCHANDISE"
      },
      "tax_jurisdictions": [
        {
          "tax_rate": 0.0625,
          "tax_due_decimal": 625,
          "fee_amount": 0,
          "rate_type": "GENERAL STATE SALES TAX",
          "tax_authority_name": "Illinois",
          "tax_authority_type": "",
          "tax_type": "SALES",
          "note": ""
        },
        {
          "tax_rate": 0.03,
          "tax_due_decimal": 300,
          "fee_amount": 0,
          "rate_type": "GENERAL COUNTY LOCAL SALES TAX",
          "tax_authority_name": "Cook County",
          "tax_authority_type": "",
          "tax_type": "SALES",
          "note": ""
        },
        {
          "tax_rate": 0.0125,
          "tax_due_decimal": 125,
          "fee_amount": 0,
          "rate_type": "GENERAL CITY LOCAL SALES TAX",
          "tax_authority_name": "Chicago",
          "tax_authority_type": "",
          "tax_type": "SALES",
          "note": ""
        }
      ],
      "tax_amount": 1050,
      "amount_excluding_tax": 10000,
      "amount_including_tax": 11050,
      "quantity": 2,
      "type": "b2c"
    },
    "... shipping line ..."
  ],
  "reference_order_id": "order-1001",
  "transaction_processed_at": 1793039302
}
```

```json 404 theme={null}
{
  "code": 404,
  "type": "CALCULATION_NOT_FOUND",
  "message": "Unable to find calculation with ID: calc_does_not_exist in test environment."
}
```


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