---
title: "Update Bank Transaction"
method: PATCH
path: "/v2/bank-transactions/{transaction_id}"
tags: ["bank-transactions"]
---

# Update Bank Transaction

`PATCH /v2/bank-transactions/{transaction_id}`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/bank-transactions/{transaction_id}`
- Auth: HTTP bearer

Update a Bank Transaction

## Path parameters

- `transaction_id` string, required

## Request body

- BankTransactionUpdate: Schema for updating a bank transaction.
  - `is_payment` boolean, nullable: Whether this is a payment. True=payment, False=non-payment, None=undetermined
  - `non_payment_reason` string, nullable: Reason for marking this transaction as a non-payment
  - `amount_handled_outside` union: Amount (in standard units, e.g. dollars) handled outside of Stuut. Negative when payments over-allocate the transaction; cannot exceed the amount.
    - number
    - string, decimal
  - `handled_outside_reason` string, nullable: Reason why this transaction was handled outside of Stuut
  - `timestamp` string, date-time, nullable: Transaction timestamp (draft transactions only)
  - `reference_number` string, nullable: Transaction reference number (draft transactions only)
  - `description` string, nullable: Transaction description (draft transactions only)
  - `type` 'deposit' | 'withdrawal'
  - `amount` union: Transaction amount in standard units, e.g. dollars (draft transactions only)
    - number
    - string, decimal

## Response `200`

Successful Response

- BankTransaction: Main Bank Transaction detail schema.
  - `created_at` string, date-time, required
  - `modified_at` string, date-time, nullable, required
  - `id` string, required
  - `timestamp` string, date-time, required: If posted, the time the transaction posted. Otherwise the time the transaction was initiated/authorized.
  - `account_mask` string, required: Last 4 digits of the bank account number
  - `account_id` string, required: The id of the `bank_account` associated with the transaction.
  - `reference_number` string, required: The transaction reference number.
  - `description` string, nullable, required: The transaction's detail that often appears on your statement and portal. It can contain remittance information or descriptions about the payment.
  - `posted` boolean, required: Whether the transaction has been posted
  - `amount` string, decimal, required: 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` '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', required: The 3 character [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
  - `type` 'deposit' | 'withdrawal', required
  - `agent_extractions` AgentExtractions, required: Agent extractions for a bank transaction.
    - `counterparty_name` string, nullable, required
    - `counterparty_raw` string, nullable, required
    - `invoice_numbers` string[], required
  - `agent_metrics` AgentMetrics, required: The AI agent's confidence metrics
    - `confidence_reason` string, nullable: The justification for the agent's confidence score.
    - `confidence_score` integer, nullable: 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` 'duplicate' | 'insufficient' | 'invalid_file_type' | 'irrelevant' | 'processing_error' | 'upload_missing', nullable: The code for why an error occurred when processing the statement.
    - `uncertainties` string[]: A list of uncertainties we have regarding the result.
  - `is_agent_processing` boolean, required
  - `payment_status` 'non_payment' | 'potential_payment' | 'draft_payment' | 'posted_payment' | 'handled_outside', required: Status indicating the phase of cash application for a bank transaction.
  - `is_payment` boolean, nullable, required: Whether this is a payment. True=payment, False=non-payment, None=undetermined
  - `non_payment_reason` string, nullable, required: Reason for marking this transaction as a non-payment
  - `total_allocated` string, decimal, required: Total amount allocated to payments
  - `amount_handled_outside` string, decimal, required: Amount handled outside of Stuut
  - `handled_outside_reason` string, nullable, required: Reason why this transaction was handled outside of Stuut
  - `counterparty_info` CounterpartyInfo, required: Counterparty information aggregated from transaction and payments.
    - `display` string, required: Display name for the counterparty
    - `id` string, nullable, required: Partner ID if single partner identified
    - `partner_count` integer, required: Number of distinct partners from payments
  - `has_remittance` boolean, required: Whether transaction or any of its payments are associated to a remittance
  - `has_on_account` boolean, required: Whether any payment on this transaction has funds left on account
  - `amount_on_account` string, decimal, required: Total funds left on account across this transaction's payments, in standard units. Unallocated amounts net of refunds. Like `total_allocated`, this sums payments in the transaction's currency, so it is unreliable when `has_fx_payments` is true.
  - `has_fx_payments` boolean, required: Whether any payment on this transaction involves foreign exchange (different currency than bank transaction)
  - `has_posting_errors` boolean, required: Whether any payment on this transaction has a posting error and has not been posted
  - `payout` PayoutInfo, required: Minimal payout reference for the bank-transaction detail response.
    - `id` string, required: Stuut payout ID
    - `remote_id` string, required: The payout's ID in the upstream payment processor
    - `url` string, nullable, required: Dashboard URL for the payout in the upstream payment processor, if available.
  - `object` string, required: String representing the object's type. Objects of the same type share the same value.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/stuut/apis/stuut-api.md) - [All operations](https://skmtc.dev/stuut/apis/stuut-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stuut/apis/stuut-api/revisions/3b5ab941f918?raw)
