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

# Create Transaction

> This endpoint creates a transaction.

## Base URL `https://api.tolt.com`

<br />

### Body Parameters

<ParamField body="amount*" type="number">
  The transaction amount in cents
</ParamField>

<ParamField body="customer_id*" type="string">
  The ID of the customer associated with this transaction
</ParamField>

<ParamField body="billing_type" type="string - optional">
  The billing type. Valid values are: **'one\_time'** or **'subscription'**
</ParamField>

<ParamField body="charge_id" type="string - optional">
  Associated charge identifier
</ParamField>

<ParamField body="click_id" type="string - optional">
  Associated click identifier
</ParamField>

<ParamField body="created_at" type="string - optional">
  ISO 8601 timestamp of when the transaction was created
</ParamField>

<ParamField body="product_id" type="string - optional">
  The ID of the product associated with this transaction
</ParamField>

<ParamField body="product_name" type="string - optional">
  The name of the product associated with this transaction
</ParamField>

<ParamField body="source" type="string - optional">
  Source of the transaction
</ParamField>

<ParamField body="interval" type="string - optional">
  For subscription billing type. Valid values are: **'month'** or **'year'**
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="array[object]">
  <Expandable title="properties" defaultOpen={true}>
    <ResponseField name="id" type="string">
      Unique identifier for the transaction
    </ResponseField>

    <ResponseField name="amount" type="number">
      Transaction amount in cents
    </ResponseField>

    <ResponseField name="customer_id" type="string">
      ID of the associated customer
    </ResponseField>

    <ResponseField name="billing_type" type="string">
      The billing type
    </ResponseField>

    <ResponseField name="amount_excluding_tax" type="number | null">
      Transaction amount excluding tax in cents
    </ResponseField>

    <ResponseField name="amount_including_tax" type="number | null">
      Transaction amount including tax in cents
    </ResponseField>

    <ResponseField name="tax" type="number | null">
      Tax amount in cents
    </ResponseField>

    <ResponseField name="currency" type="string">
      Currency code for the transaction amount
    </ResponseField>

    <ResponseField name="payment_currency" type="string">
      Currency used for the payment
    </ResponseField>

    <ResponseField name="payment_amount" type="number | null">
      Payment amount in cents
    </ResponseField>

    <ResponseField name="payment_amount_excluding_tax" type="number | null">
      Payment amount excluding tax in cents
    </ResponseField>

    <ResponseField name="payment_amount_including_tax" type="number | null">
      Payment amount including tax in cents
    </ResponseField>

    <ResponseField name="payment_tax" type="number | null">
      Payment tax amount in cents
    </ResponseField>

    <ResponseField name="charge_id" type="string">
      Associated charge identifier
    </ResponseField>

    <ResponseField name="click_id" type="string">
      Associated click identifier
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of creation
    </ResponseField>

    <ResponseField name="source" type="string">
      Source of the transaction
    </ResponseField>

    <ResponseField name="status" type="string">
      Status of the transaction
    </ResponseField>

    <ResponseField name="metadata" type="object | null">
      Optional metadata
    </ResponseField>

    <ResponseField name="interval" type="string">
      Subscription interval
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of last update
    </ResponseField>

    <ResponseField name="product_ids" type="array[string]">
      List of product identifiers associated with the transaction
    </ResponseField>

    <ResponseField name="product_names" type="array[string] | null">
      List of product names associated with the transaction
    </ResponseField>

    <ResponseField name="conversion_rate" type="number | null">
      Conversion rate if currency conversion is involved
    </ResponseField>

    <ResponseField name="partner_id" type="string">
      ID of the partner associated with the transaction
    </ResponseField>

    <ResponseField name="program_id" type="string">
      Program ID the transaction belongs to
    </ResponseField>

    <ResponseField name="organization_id" type="string">
      Organization ID
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST 'https://api.tolt.com/v1/transactions' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
      "amount": 9999,
      "customer_id": "cust_dK9bzRGn46BhVgNFHD6fDgXW",
      "billing_type": "subscription",
      "charge_id": "ch_9bzRGn46BhVgNFHD6fDgXW",
      "click_id": "clk_7mbzRGn46BhVgNFHD6fDgXW",
      "product_id": "prod_123",
      "product_name": "Premium Plan",
      "source": "stripe",
      "interval": "month",
      "created_at": "2025-01-15T14:30:00.000Z"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={"system"}
  {
    "success": true,
    "data": [
      {
        "id": "txn_eK9bzRGn46BhVgNFHD6fDgXW",
        "status": "paid",
        "amount": 14999,
        "amount_excluding_tax": null,
        "tax": null,
        "currency": "USD",
        "payment_currency": "USD",
        "payment_amount": null,
        "payment_amount_excluding_tax": null,
        "payment_tax": null,
        "charge_id": "ch_9bzRGn46BhVgNFHD6fDgXW",
        "metadata": null,
        "source": "stripe",
        "partner_id": "d30a0807-a0f0-44fc-a38e-2c3a1f640f07",
        "organization_id": "org_JE3mfYNL9ci7sFaJazAv2",
        "program_id": "prg_YRsbPDAKhWfdqJbFACheh",
        "click_id": "clk_7mbzRGn46BhVgNFHD6fDgXW",
        "customer_id": "cust_dK9bzRGn46BhVgNFHD6fDgXW",
        "created_at": "2025-04-25T09:35:53.025Z",
        "updated_at": "2025-04-25T09:36:10.740Z",
        "amount_including_tax": null,
        "payment_amount_including_tax": null,
        "product_ids": [],
        "interval": "year",
        "billing_type": "subscription",
        "product_names": [],
        "conversion_rate": null
      }
    ]
  }
  ```
</ResponseExample>
