Skip to main content
PATCH
Update Transaction

Overview

Use this endpoint when you need to enrich or correct an existing transaction after creation: custom metadata, deviceDetails, channel, or reason. It does not change amount, status, parties, or other core fields (use Change status for status).
Shallow merge for metadata and deviceDetails: only keys you send are overwritten; omitted keys are preserved. Nested objects (e.g. metadata.tags) are replaced as a whole when you send that key. To clear channel, send "channel": null.

Endpoints

Both accept the same JSON body and return the same response shape.

Authentication

Requires transactions:edit (API key or session with equivalent permission):

Query Parameters

boolean
default:"false"
When true, re-runs KYT rules with trigger transaction_updated after the patch (same mode as status change). Default: false.

Request Body

At least one field is required.
object
Shallow merge into existing metadata. Example: existing { "purpose": "payroll", "tags": { "a": 1 } } + body { "tags": { "b": 2 } }{ "purpose": "payroll", "tags": { "b": 2 } } (top-level tags is replaced as a whole).
object
Shallow merge into existing deviceDetails (stored in device_details). Use this to add or correct device context after create — e.g. ipAddress, deviceId, osName, manufacturer, model, fraud flags (isVpn, isEmulator, …). Same field schema as Create transaction (deviceDetails). Rules evaluate paths like deviceDetails.ipAddress.
string | null
Transaction channel (max 50 chars), e.g. web, mobile, api. Send null to clear.
string
Outcome / decline reason enum. See Reason enum.

Example

Response (200 OK)

When executeRules=true, rulesExecutionSummary is included (same shape as create / change status).

Errors

Side effects

  • Audit: transaction_updated event on the transaction timeline with changed fields (metadata, deviceDetails, channel, and/or reason in changes).
  • Webhook: transaction.updated (includes changes and current deviceDetails when applicable).
  • Rules: only when executeRules=true.

Examples

Get transaction

Read full transaction after update

Change status

Update lifecycle status and re-run rules

Create transaction

Initial metadata on create

Reason enum

Allowed reason values