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

# Create a transaction

> Creates a transaction.



## OpenAPI

````yaml /openapi.json post /bankaccounts/{bankAccountId}/transactions
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /bankaccounts/{bankAccountId}/transactions:
    post:
      tags:
        - Bank Accounts
      summary: Create a transaction
      description: Creates a transaction.
      operationId: CreateTransactionForBankAccount
      parameters:
        - name: bankAccountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TransactionDto'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TransactionDto'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TransactionDto'
      responses:
        '202':
          description: >-
            When request is accepted. Returns a hypermedia 'Link' object of the
            transaction to be created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            When transaction with specified id is not associated with
            authenticated client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When transaction with specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    TransactionDto:
      type: object
      properties:
        matterId:
          type: string
          description: Unique identifier of the associated matter.
          nullable: true
          example: da4e7fd1-5394-4ca9-b1c6-e18c4e2bf262
        payorId:
          type: string
          description: Unique identifier of the associated contact.
          nullable: true
        type:
          type: string
          description: "The type of the transaction.\r\n\r\nPossible values: Deposit."
          nullable: true
          example: Deposit
        amount:
          type: number
          description: >-
            The amount of the transaction in dollars. Limited to 2 decimal
            places (cents).
          format: double
          example: 102.65
        effectiveDate:
          type: string
          description: Date of the transaction.
          format: date-time
        reference:
          type: string
          description: Reference for the transaction.
          nullable: true
        reason:
          type: string
          description: Reason for the transaction.
          nullable: true
        description:
          type: string
          description: Description of the transaction.
          nullable: true
        note:
          type: string
          description: Note for the transaction (for internal use).
          nullable: true
      additionalProperties: false
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````