---
title: "Update one"
method: PATCH
path: "/v1/card_transactions/{card_transaction_id}"
tags: ["Card transaction"]
---

# Update one

`PATCH /v1/card_transactions/{card_transaction_id}`

Updates a card transaction. For company users the **only** editable field is
`comments` (the rendición note): if the request body does not include
`comments` and the caller is not a Cardda superadmin, the request is rejected
with `401`.

The fields `merchant_id`, `issuing_statement_id`, `status`, and `exchange_rate`
are **admin-only** and ignored for non-admin callers.

The transaction's rendición custom-column values live on the transaction and
are protected by two immutability gates; they are not editable through this
endpoint.

## Path parameters

- `card_transaction_id` string, required

## Parameters

- `#/paths/~1v1~1merchants/get/parameters/0` — unresolved $ref

## Request body

- CardTransactionUpdate — Payload to update a card transaction. For company users the **only** editable field is `comments` (the free-form rendición note): if the request contains no `comments` key and the caller is not a Cardda superadmin, the request is rejected with `401`. The remaining fields (`merchant_id`, `issuing_statement_id`, `status`, `exchange_rate`) are **admin-only** and silently ignored for non-admin callers. Note on rendición: the transaction's custom-column values (the fields a company configures for expense reporting) live on the transaction itself and are governed by two immutability gates — they are not editable through this endpoint.
  - `comments` string — Free-form internal note attached to the transaction (rendición comment).
  - `merchant_id` string, uuid — **Admin-only.** Reassign the linked `Merchant`.
  - `issuing_statement_id` string — **Admin-only.** Link to an issuing statement.
  - `status` 'pending' | 'approved' | 'declined' | 'reversed' | 'settled' | 'superseded' | 'disputed' | 'refunded' — **Admin-only.** Override the transaction lifecycle status.
  - `exchange_rate` string — **Admin-only.** Override the FX rate applied at settlement.

## Response `200`

The updated card transaction.

- Transaction — A row in Cardda's unified accounting-ledger transaction list. Each transaction is a projection of an `Accounting::LedgerTx` and may originate from a card transaction, a bank transfer, a payment, a commission, an invoice, or a balance correction. Most monetary fields are serialized as **strings of integer cents** to preserve precision. Filtering, sorting and pagination are applied over the underlying ledger view. This schema describes the **list / CSV** projection (`GET /v1/transactions`, `GET /v1/transactions/download_csv`). The single-transaction `show` endpoint returns a narrower, different projection — see `Transaction_show`.
  - `id` string, uuid, required — The transaction id. This is the `accounting_ledger_tx_id` and is the identifier used by the file, label and reconciliation endpoints.
  - `accounting_ledger_tx_id` string, uuid — The underlying `Accounting::LedgerTx` id. Equal to `id`; exposed as a distinct field for clients that key off the ledger id explicitly.
  - `company_id` string, uuid — The company that owns the transaction.
  - `user_id` string, nullable — The user associated with the transaction, if any.
  - `account_id` string, uuid, nullable — The account the transaction belongs to.
  - `account` object, nullable — The account record associated with the transaction.
  - `card_id` string, nullable — The card id, for card transactions.
  - `card_name` string, nullable — The card name, present only for `card_transactions`.
  - `card_last4` string, nullable — Last four digits of the card, present only for `card_transactions`.
  - `description` string, nullable — Human description of the transaction.
  - `comments` string, nullable — Internal comments/notes on the transaction.
  - `transaction_type` 'card_transactions' | 'banking_bank_transactions' | 'payments' | 'commissions' | 'commission_refunds' | 'invoices', required — The kind of underlying record projected into the ledger.
  - `status` string, required — Current status of the transaction (values depend on the source type).
  - `status_reason` string, nullable — Reason for the current status, present only for `card_transactions`.
  - `amount` string, nullable — Source amount in integer cents, serialized as a string.
  - `currency` string, nullable — Source currency (ISO 4217).
  - `charge` string — Negative (or zero) side of the amount in integer cents (outflow), serialized as a string (`"0"` when there is no charge side).
  - `deposit` string — Positive (or zero) side of the amount in integer cents (inflow), serialized as a string (`"0"` when there is no deposit side).
  - `amount_in_clp` string, nullable — Amount converted to CLP in integer cents, serialized as a string.
  - `exchange_rate` string — Human-formatted FX rate applied to the row (thousands separator `,`, decimal `.`). Empty string when the rate is genuinely unknown. Use `exchange_rate_value` for a machine-parseable rate.
  - `exchange_rate_value` string, nullable — Machine-parseable FX rate (no thousands separator), serialized as a string to preserve precision, or `null` for cross-currency rows whose rate is genuinely unknown.
  - `target_amount` string, nullable — Amount in the target currency in integer cents, serialized as a string.
  - `target_currency` string, nullable — Target currency (ISO 4217, lower-cased in the ledger view).
  - `target_cumulative_balance_with_commission` integer, nullable — Running balance in cents including commissions. Only computed when the list is requested with cumulative balances (`_with_cumulative_balances=true`) or on the CSV export.
  - `source_type` string, nullable — Polymorphic type of the underlying source record.
  - `source_id` string, nullable — Polymorphic id of the underlying source record.
  - `commission_amount` string — Commission amount in integer cents, serialized as a string. An empty string (`""`) is returned when the row has no associated commission ledger entry.
  - `commission_currency` string, nullable — Commission currency.
  - `commission_percentage` string, nullable — Commission percentage applied.
  - `merchant_name` string, nullable — Merchant/recipient name (card merchant or bank recipient).
  - `merchant_image_url` string, nullable — Merchant logo URL (card transactions only).
  - `affects_balance` boolean — Whether this transaction affects the account balance.
  - `cartola_id` string, uuid, nullable — The cartola (statement) this transaction is assigned to, if any.
  - `cartola_date` string, date-time, nullable — The accounting date used to place the transaction in a cartola.
  - `authorized_at` string, date-time, nullable — Timestamp when the transaction was authorized.
  - `cumulative_balance` integer, nullable — Running balance in cents. A virtual attribute aliased to the persisted ledger value (`target_cumulative_balance_cents`), so the key is **always present** — it holds the value stored on the ledger row. `cumulative_balance` and `target_cumulative_balance` are aliases of the SAME underlying value. Only the on-the-fly window-function **recomputation** of these balances is gated on `_with_cumulative_balances=true` (and on the CSV export); without it the persisted value is returned.
  - `target_cumulative_balance` integer, nullable — Running balance in cents. Aliased to the SAME persisted ledger value as `cumulative_balance` (`target_cumulative_balance_cents`); both keys are **always present** and carry the same number. Only the window-function **recomputation** is gated on `_with_cumulative_balances=true` (or the CSV export).
  - `created_at` string, date-time — When the underlying transaction record was created.
  - `updated_at` string, date-time — When the underlying transaction record was last updated.
  - `custom_column_values` object[] — Rendición (expense-tracking) custom-column values attached to the transaction. Each entry pairs a custom column with its stored value and displayable value.
    - `custom_column_id` string, uuid
    - `value` string, nullable
    - `displayable_value` string, nullable

## Other responses

- `401` — Unauthorized — non-superadmin caller sent a body without `comments`. Body: `{ "message": "Unauthorized (401)" }`.
- `404` — Card transaction not found (or not visible to the caller).
- `422` — Unprocessable Entity — update failed validations.

---

[API](https://skmtc.dev/cardda/apis/banking-api.md) · [All operations](https://skmtc.dev/cardda/apis/banking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cardda/banking-api/revisions/ff1aeb3fda8b/schema)
