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

# Create TPA Transaction

> Create a new transaction



## OpenAPI

````yaml api-reference/openapi.json post /tpa/transaction/create
openapi: 3.0.0
info:
  title: Stax API
  version: 1.0.0
  description: API for Stax automated document classifier and trust accounting system
  contact:
    name: Stax.ai
    url: https://stax.ai
servers:
  - url: https://api.stax.ai
    description: Production server
security: []
paths:
  /tpa/transaction/create:
    post:
      tags:
        - TPA
      summary: Create TPA Transaction
      description: Create a new transaction
      operationId: tpaTransactionCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - statementId
              properties:
                statementId:
                  $ref: '#/components/schemas/ObjectId'
                date:
                  type: string
                  format: date-time
                description:
                  type: string
                amount:
                  type: number
                txType:
                  type: string
                txSubType:
                  type: string
                page:
                  type: number
      responses:
        '200':
          description: Transaction created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  transaction:
                    $ref: '#/components/schemas/TpaTransaction'
      security:
        - cookieAuth: []
        - bearerAuth: []
components:
  schemas:
    ObjectId:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: MongoDB ObjectId
    TpaTransaction:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        plan:
          $ref: '#/components/schemas/ObjectId'
        account:
          $ref: '#/components/schemas/ObjectId'
        planId:
          type: string
        accountNumber:
          type: string
        statement:
          $ref: '#/components/schemas/ObjectId'
        row:
          $ref: '#/components/schemas/ObjectId'
        creator:
          $ref: '#/components/schemas/ObjectId'
        planYear:
          type: number
        page:
          type: number
        date:
          type: string
          format: date-time
        description:
          type: string
        amount:
          type: number
        txType:
          type: string
        txSubType:
          type: string
        confidence:
          type: number
        history:
          type: array
          items:
            $ref: '#/components/schemas/HistoryChange'
    HistoryChange:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/ObjectId'
        timestamp:
          type: string
          format: date-time
        changes:
          type: array
          items:
            $ref: '#/components/schemas/FieldChange'
    FieldChange:
      type: object
      properties:
        field:
          type: string
        from:
          type: string
        to:
          type: string
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: authToken
      description: Cookie-based authentication using userId and authToken cookies
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer token authentication requires two headers: 1) Authorization
        header with 'Bearer {apiKey}' format, and 2) email header with the
        user's email address for identification.

````