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

# Update Bank Transaction

> Update a Bank Transaction



## OpenAPI

````yaml https://api.stuut.ai/openapi.json patch /v2/bank-transactions/{transaction_id}
openapi: 3.1.0
info:
  title: Stuut API
  termsOfService: https://stuut.ai/terms-and-conditions
  contact:
    name: Stuut Support
    url: https://stuut.ai/
    email: devs@stuut.co
  version: 2.0.0
servers: []
security:
  - HTTPBearer: []
tags:
  - name: adjustments
    description: Operations for managing payment adjustments (fees, discounts, write-offs).
    x-displayName: Adjustments
  - name: aether
    description: Operations for aether.
    x-displayName: Aether
  - name: analytics
    description: Operations for retrieving analytics and dashboard data.
    x-displayName: Analytics
  - name: assistant
    description: Operations for the in-app chat assistant.
    x-displayName: Assistant
  - name: audit-log
    description: Operations for retrieving the organization's audit log.
    x-displayName: Audit Log
  - name: bank-accounts
    description: Operations for retrieving and managing bank accounts.
    x-displayName: Bank Accounts
  - name: bank-statements
    description: Operations for retrieving and managing bank statements.
    x-displayName: Bank Statements
  - name: bank-transactions
    description: Operations for retrieving and managing bank transactions.
    x-displayName: Bank Transactions
  - name: business-units
    description: Operations for listing and managing business units.
    x-displayName: Business Units
  - name: call-agent
    description: >-
      Operations for initiating and managing real-time voice calls with
      partners.
    x-displayName: Call Agent
  - name: calls
    description: Operations for retrieving and managing voice call records.
    x-displayName: Calls
  - name: cash-app
    description: Operations for cash application — matching incoming payments to invoices.
    x-displayName: Cash Application
  - name: chats
    description: Operations for managing chat conversations.
    x-displayName: Chats
  - name: cnam-registration
    description: Operations for managing CNAM (caller ID name) registration.
    x-displayName: CNAM Registration
  - name: credit-memos
    description: Operations for retrieving and searching credit memos.
    x-displayName: Credit Memos
  - name: custom-table-templates
    description: >-
      Operations for managing custom table templates used in email template
      variables.
    x-displayName: Custom Table Templates
  - name: customer-segments
    description: Operations for managing customer segments.
    x-displayName: Customer Segments
  - name: deductions-knowledge
    description: Operations for managing deduction processing knowledge entries.
    x-displayName: Deductions Knowledge
  - name: email-threads
    description: Operations for managing email threads.
    x-displayName: Email Threads
  - name: emails
    description: Operations for retrieving and managing emails.
    x-displayName: Emails
  - name: exports
    description: Operations for requesting and retrieving async data exports.
    x-displayName: Exports
  - name: integrations
    description: >-
      Operations for managing integrations with external systems (e.g. ERP, CRM,
      etc.).
    x-displayName: Integrations
  - name: internal-contacts
    description: >-
      Operations for managing internal contacts (CSMs, account managers, etc.)
      and their assignments to partners.
    x-displayName: Internal Contacts
  - name: invoices
    description: Operations for retrieving and managing invoices.
    x-displayName: Invoices
  - name: kyb
    description: Operations for Know Your Business (KYB) verification.
    x-displayName: KYB
  - name: ledger-accounts
    description: Operations for retrieving and managing ledger accounts.
    x-displayName: Ledger Accounts
  - name: mailbox-settings
    description: >-
      Operations for an organization's mailbox provider configuration: Microsoft
      admin consent, shared-mailbox discovery, and provider health.
    x-displayName: Mailbox Settings
  - name: mailboxes
    description: >-
      Operations for connecting, listing, updating, and archiving user and
      shared mailboxes, including delegated OAuth sign-in.
    x-displayName: Mailboxes
  - name: media
    description: >-
      Operations for signing direct-to-storage media uploads (e.g. signature
      images).
    x-displayName: Media
  - name: organizations
    description: Operations for retrieving and managing the current organization.
    x-displayName: Organizations
  - name: outreach-workflows
    description: Operations for managing automated collections outreach workflows.
    x-displayName: Outreach Workflows
  - name: partners
    description: Operations for retrieving and managing customers.
    x-displayName: Partners
  - name: payments
    description: Operations for approving and managing payments.
    x-displayName: Payments
  - name: report-configs
    description: >-
      Operations for managing report configurations (frequency, recipients,
      schedule).
    x-displayName: Report Configs
  - name: sms-campaign-registration
    description: Operations for managing A2P 10DLC SMS campaign registration.
    x-displayName: SMS Campaign Registration
  - name: sms-templates
    description: >-
      Operations for defining, storing, and managing parameterized SMS message
      templates.
    x-displayName: SMS Templates
  - name: sms-threads
    description: Operations for retrieving and managing SMS conversation threads.
    x-displayName: SMS Threads
  - name: users
    description: Operations for retrieving and managing users.
    x-displayName: Users
  - name: users-ooo
    description: Operations for managing user out-of-office (OOO) status and coverage.
    x-displayName: Users OOO
paths:
  /v2/bank-transactions/{transaction_id}:
    patch:
      tags:
        - bank-transactions
      summary: Update Bank Transaction
      description: Update a Bank Transaction
      operationId: PatchBankTransactionsTransactionId
      parameters:
        - name: transaction_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankTransactionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankTransaction'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BankTransactionUpdate:
      properties:
        is_payment:
          anyOf:
            - type: boolean
            - type: 'null'
          title: ''
          description: >-
            Whether this is a payment. True=payment, False=non-payment,
            None=undetermined
        non_payment_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Reason for marking this transaction as a non-payment
        amount_handled_outside:
          anyOf:
            - anyOf:
                - type: number
                  minimum: 0
                - type: string
                  pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              format: decimal
            - type: 'null'
          title: ''
          description: Amount (in standard units, e.g. dollars) handled outside of Stuut
        handled_outside_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Reason why this transaction was handled outside of Stuut
        timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: ''
          description: Transaction timestamp (draft transactions only)
        reference_number:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Transaction reference number (draft transactions only)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Transaction description (draft transactions only)
        type:
          anyOf:
            - $ref: '#/components/schemas/BankTransactionType'
            - type: 'null'
          title: ''
          description: 'Transaction type: deposit or withdrawal (draft transactions only)'
        amount:
          anyOf:
            - anyOf:
                - type: number
                  minimum: 0
                - type: string
                  pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              format: decimal
            - type: 'null'
          title: ''
          description: >-
            Transaction amount in standard units, e.g. dollars (draft
            transactions only)
      type: object
      title: BankTransactionUpdate
      description: Schema for updating a bank transaction.
    BankTransaction:
      properties:
        created_at:
          type: string
          format: date-time
          title: ''
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: ''
        id:
          type: string
          title: ''
        timestamp:
          type: string
          format: date-time
          title: ''
          description: >-
            If posted, the time the transaction posted. Otherwise the time the
            transaction was initiated/authorized.
        account_mask:
          type: string
          title: ''
          description: Last 4 digits of the bank account number
        account_id:
          type: string
          title: ''
          description: The id of the `bank_account` associated with the transaction.
        reference_number:
          type: string
          title: ''
          description: The transaction reference number.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: >-
            The transaction's detail that often appears on your statement and
            portal. It can contain remittance information or descriptions about
            the payment.
        posted:
          type: boolean
          title: ''
          description: Whether the transaction has been posted
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          format: decimal
          title: ''
          description: >-
            The gross amount (less any fees) in the currency's smallest unit,
            e.g. $10 USD would be represented as `1000`. `amount` must be >= 0
        currency:
          anyOf:
            - $ref: '#/components/schemas/Currency'
            - type: 'null'
          title: ''
          description: The ISO-4217 currency code of the transaction.
        type:
          $ref: '#/components/schemas/BankTransactionType'
          title: ''
          description: >-
            A `withdrawal` indicates funds flowing out of your account (negative
            amount). A `deposit` indicates funds flowing into your account
            (positive amount).
        agent_extractions:
          $ref: '#/components/schemas/AgentExtractions'
          title: ''
        agent_metrics:
          anyOf:
            - $ref: '#/components/schemas/AgentMetrics'
            - type: 'null'
          title: ''
        is_agent_processing:
          type: boolean
          title: ''
          description: Whether the transaction is currently being processed by an AI agent.
        payment_status:
          $ref: '#/components/schemas/PaymentApplicationStatus'
          title: ''
          description: Get the payment status of the transaction.
        is_payment:
          anyOf:
            - type: boolean
            - type: 'null'
          title: ''
          description: >-
            Whether this is a payment. True=payment, False=non-payment,
            None=undetermined
        non_payment_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Reason for marking this transaction as a non-payment
        total_allocated:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          format: decimal
          title: ''
          description: Total amount allocated to payments
        amount_handled_outside:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          format: decimal
          title: ''
          description: Amount handled outside of Stuut
        handled_outside_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Reason why this transaction was handled outside of Stuut
        counterparty_info:
          anyOf:
            - $ref: '#/components/schemas/CounterpartyInfo'
            - type: 'null'
          title: ''
          description: Aggregated counterparty info from payments
        has_remittance:
          type: boolean
          title: ''
          description: >-
            Whether transaction or any of its payments are associated to a
            remittance
        has_on_account:
          type: boolean
          title: ''
          description: >-
            Whether any payment on this transaction has on-account funds
            (unallocated amount)
        has_fx_payments:
          type: boolean
          title: ''
          description: >-
            Whether any payment on this transaction involves foreign exchange
            (different currency than bank transaction)
        has_posting_errors:
          type: boolean
          title: ''
          description: >-
            Whether any payment on this transaction has a posting error and has
            not been posted
        payout:
          anyOf:
            - $ref: '#/components/schemas/PayoutInfo'
            - type: 'null'
          title: ''
          description: The payout this transaction represents, if any.
        object:
          type: string
          title: ''
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          readOnly: true
      type: object
      required:
        - created_at
        - modified_at
        - id
        - timestamp
        - account_mask
        - account_id
        - reference_number
        - description
        - posted
        - amount
        - currency
        - type
        - agent_extractions
        - agent_metrics
        - is_agent_processing
        - payment_status
        - is_payment
        - non_payment_reason
        - total_allocated
        - amount_handled_outside
        - handled_outside_reason
        - counterparty_info
        - has_remittance
        - has_on_account
        - has_fx_payments
        - has_posting_errors
        - payout
        - object
      title: BankTransaction
      description: Main Bank Transaction detail schema.
    HTTPValidationError:
      $defs:
        ValidationError:
          properties:
            loc:
              items:
                anyOf:
                  - type: string
                  - type: integer
              title: Location
              type: array
            msg:
              title: Message
              type: string
            type:
              title: Type
              type: string
          required:
            - loc
            - msg
            - type
          title: ValidationError
          type: object
          x-speakeasy-include: true
      properties:
        type:
          const: request-validation
          title: Type
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Human-readable description of this specific problem.
          title: Detail
          x-speakeasy-error-message: true
        status:
          const: 422
          title: Status
          type: integer
        title:
          description: Short human-readable summary of the problem.
          title: Title
          type: string
          x-speakeasy-error-message: true
        errors:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Errors
          type: array
      required:
        - type
        - status
        - title
        - errors
      title: APIError
      type: object
    BankTransactionType:
      type: string
      enum:
        - deposit
        - withdrawal
      title: BankTransactionType
    Currency:
      type: string
      enum:
        - ADP
        - AED
        - AFA
        - AFN
        - ALK
        - ALL
        - AMD
        - ANG
        - AOA
        - AOK
        - AON
        - AOR
        - ARA
        - ARL
        - ARM
        - ARP
        - ARS
        - ATS
        - AUD
        - AWG
        - AZM
        - AZN
        - BAD
        - BAM
        - BAN
        - BBD
        - BDT
        - BEC
        - BEF
        - BEL
        - BGL
        - BGM
        - BGN
        - BGO
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BOL
        - BOP
        - BOV
        - BRB
        - BRC
        - BRE
        - BRL
        - BRN
        - BRR
        - BRZ
        - BSD
        - BTN
        - BUK
        - BWP
        - BYB
        - BYN
        - BYR
        - BZD
        - CAD
        - CDF
        - CHE
        - CHF
        - CHW
        - CLE
        - CLF
        - CLP
        - CNH
        - CNX
        - CNY
        - COP
        - COU
        - CRC
        - CSD
        - CSK
        - CUC
        - CUP
        - CVE
        - CYP
        - CZK
        - DDM
        - DEM
        - DJF
        - DKK
        - DOP
        - DZD
        - ECS
        - ECV
        - EEK
        - EGP
        - ERN
        - ESA
        - ESB
        - ESP
        - ETB
        - EUR
        - FIM
        - FJD
        - FKP
        - FRF
        - GBP
        - GEK
        - GEL
        - GHC
        - GHS
        - GIP
        - GMD
        - GNF
        - GNS
        - GQE
        - GRD
        - GTQ
        - GWE
        - GWP
        - GYD
        - HKD
        - HNL
        - HRD
        - HRK
        - HTG
        - HUF
        - IDR
        - IEP
        - ILP
        - ILR
        - ILS
        - INR
        - IQD
        - IRR
        - ISJ
        - ISK
        - ITL
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRH
        - KRO
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LTL
        - LTT
        - LUC
        - LUF
        - LUL
        - LVL
        - LVR
        - LYD
        - MAD
        - MAF
        - MCF
        - MDC
        - MDL
        - MGA
        - MGF
        - MKD
        - MKN
        - MLF
        - MMK
        - MNT
        - MOP
        - MRO
        - MRU
        - MTL
        - MTP
        - MUR
        - MVP
        - MVR
        - MWK
        - MXN
        - MXP
        - MXV
        - MYR
        - MZE
        - MZM
        - MZN
        - NAD
        - NGN
        - NIC
        - NIO
        - NLG
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEI
        - PEN
        - PES
        - PGK
        - PHP
        - PKR
        - PLN
        - PLZ
        - PTE
        - PYG
        - QAR
        - RHD
        - ROL
        - RON
        - RSD
        - RUB
        - RUR
        - RWF
        - SAR
        - SBD
        - SCR
        - SDD
        - SDG
        - SDP
        - SEK
        - SGD
        - SHP
        - SIT
        - SKK
        - SLE
        - SLL
        - SOS
        - SRD
        - SRG
        - SSP
        - STD
        - STN
        - SUR
        - SVC
        - SYP
        - SZL
        - THB
        - TJR
        - TJS
        - TMM
        - TMT
        - TND
        - TOP
        - TPE
        - TRL
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UAK
        - UGS
        - UGX
        - USD
        - USN
        - USS
        - UYI
        - UYP
        - UYU
        - UYW
        - UZS
        - VEB
        - VED
        - VEF
        - VES
        - VND
        - VNN
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XBA
        - XBB
        - XBC
        - XBD
        - XCD
        - XCG
        - XDR
        - XEU
        - XFO
        - XFU
        - XOF
        - XPD
        - XPF
        - XPT
        - XRE
        - XSU
        - XTS
        - XUA
        - XXX
        - YDD
        - YER
        - YUD
        - YUM
        - YUN
        - YUR
        - ZAL
        - ZAR
        - ZMK
        - ZMW
        - ZRN
        - ZRZ
        - ZWD
        - ZWL
        - ZWR
      description: >-
        The 3 character [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
        currency code.
      x-speakeasy-enum-format: union
    AgentExtractions:
      properties:
        counterparty_name:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
        counterparty_raw:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
        invoice_numbers:
          items:
            type: string
          type: array
          title: ''
      type: object
      required:
        - counterparty_name
        - counterparty_raw
        - invoice_numbers
      title: AgentExtractions
      description: Agent extractions for a bank transaction.
    AgentMetrics:
      properties:
        confidence_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Confidence Reason
          description: The justification for the agent's confidence score.
        confidence_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Confidence Score
          description: >-
            The confidence score of the result on a scale of 0-100, where 0
            indicates no confidence in the accuracy of the result and 100
            indicates full confidence in the accuracy of the result.
        error_code:
          anyOf:
            - type: string
              enum:
                - duplicate
                - insufficient
                - invalid_file_type
                - irrelevant
                - processing_error
                - upload_missing
              x-speakeasy-enum-format: union
            - type: 'null'
          title: Error Code
          description: The code for why an error occurred when processing the statement.
        uncertainties:
          items:
            type: string
          type: array
          title: Uncertainties
          description: A list of uncertainties we have regarding the result.
      type: object
      title: AgentMetrics
      description: The AI agent's confidence metrics
    PaymentApplicationStatus:
      type: string
      enum:
        - non_payment
        - potential_payment
        - draft_payment
        - posted_payment
        - handled_outside
      title: PaymentApplicationStatus
      description: Status indicating the phase of cash application for a bank transaction.
    CounterpartyInfo:
      properties:
        display:
          type: string
          title: ''
          description: Display name for the counterparty
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: Partner ID if single partner identified
        partner_count:
          type: integer
          minimum: 0
          title: ''
          description: Number of distinct partners from payments
          default: 0
      type: object
      required:
        - display
        - id
        - partner_count
      title: CounterpartyInfo
      description: Counterparty information aggregated from transaction and payments.
    PayoutInfo:
      properties:
        id:
          type: string
          title: ''
          description: Stuut payout ID
        remote_id:
          type: string
          title: ''
          description: The payout's ID in the upstream payment processor
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
          description: >-
            Dashboard URL for the payout in the upstream payment processor, if
            available.
      type: object
      required:
        - id
        - remote_id
        - url
      title: PayoutInfo
      description: Minimal payout reference for the bank-transaction detail response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          type: string
          title: Type
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
      x-speakeasy-include: true
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````