Transactions
Update transaction
Amend transaction metadata or custom fields.
The Update Transaction endpoint allows you to modify specific fields of an existing transaction, such as metadata, reference IDs, or custom notes. Core fields like amount, currency, and type cannot be changed once a transaction has been created.
Endpoint
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
transaction_id | string | Yes | Unique ID of the transaction to update. |
Headers
Key | Value | Required |
---|---|---|
Content-Type | application/json | Yes |
Authorization | Bearer <access_token> | Yes |
Request Body
Field | Type | Required | Description |
---|---|---|---|
reference | string | No | Updates the external reference ID. |
metadata | object | No | Updates or replaces transaction metadata. |
Response
Successful Response (200 OK)
Field | Type | Description |
---|---|---|
id | string | Transaction ID. |
account_id | string | Account linked to the transaction. |
amount | int | Amount in minor units (unchangeable). |
currency | string | Currency code (unchangeable). |
type | string | Transaction type (unchangeable). |
status | string | Current status of the transaction. |
reference | string | Updated reference value. |
metadata | object | Updated metadata. |
created_at | string | Timestamp of creation. |
updated_at | string | Timestamp of last update. |
Error Response (400 / 404 / 409)
Error Code | Meaning |
---|---|
invalid_request | Invalid or unsupported update fields. |
not_found | Transaction ID does not exist. |
conflict | Attempted to update restricted fields (amount, currency, type). |
Example Usage
cURL
JavaScript (Fetch)
You cannot update the amount, currency, or type of a transaction. For corrections, you should create a refund or a new transaction.