Change Transaction Status
API Reference
Change Transaction Status
Update transaction status and trigger update rules automatically β in the gu1 transaction monitoring product for fraud and AML, with examples for change status.
PATCH
Change Transaction Status
Endpoint
Change Transaction Status
- Automatic validation of status transitions (prevents invalid state changes)
- State machine enforcement (open β closed state rules)
- Automatic execution of rules/matrices with
transaction_status_changedtrigger (nottransaction_updated) - Transaction integrity protection
- Comprehensive audit trail
Authentication
All requests must include an API key in theAuthorization header:
Required Headers
Path Parameters
The UUID of the transaction to updateType:
string (uuid)Request Body
New transaction status. Must be a valid status enum value.Valid Statuses:
CREATED- Transaction created (open state)PROCESSING- Transaction being processed (open state)SUSPENDED- Transaction temporarily suspended (open state)SENT- Transaction sent/transmitted (closed state)EXPIRED- Transaction expired (closed state)DECLINED- Transaction declined/rejected (closed state)REFUNDED- Transaction refunded/reversed (closed state)SUCCESSFUL- Transaction completed successfully (closed state)
enum - 'CREATED' | 'PROCESSING' | 'SUSPENDED' | 'SENT' | 'EXPIRED' | 'DECLINED' | 'REFUNDED' | 'SUCCESSFUL'State Transition Rules
The endpoint enforces strict state transition rules to maintain transaction integrity:Open States
States that allow further transitions:CREATEDPROCESSINGSUSPENDEDSENT
Closed States
Final states that cannot transition to other states:EXPIREDDECLINEDREFUNDEDSUCCESSFUL
Transition Matrix
| From State | To State | Allowed? | Note |
|---|---|---|---|
| CREATED | PROCESSING | β Yes | Normal flow |
| CREATED | SUSPENDED | β Yes | Suspend for review |
| CREATED | SUCCESSFUL | β Yes | Quick approval |
| PROCESSING | SUSPENDED | β Yes | Suspend during processing |
| PROCESSING | SUCCESSFUL | β Yes | Normal completion |
| PROCESSING | DECLINED | β Yes | Reject during processing |
| SUSPENDED | PROCESSING | β Yes | Resume processing |
| SUSPENDED | SUCCESSFUL | β Yes | Approve suspended transaction |
| SUSPENDED | DECLINED | β Yes | Reject suspended transaction |
| SUCCESSFUL | PROCESSING | β No | Cannot reopen closed transaction |
| DECLINED | PROCESSING | β No | Cannot reopen closed transaction |
| EXPIRED | PROCESSING | β No | Cannot reopen closed transaction |
| REFUNDED | any | β No | Cannot change refunded transaction |
| SUCCESSFUL | DECLINED | β No | Cannot change between closed states |
- β Open β Open: Allowed (e.g., CREATED β PROCESSING)
- β Open β Closed: Allowed (e.g., PROCESSING β SUCCESSFUL)
- β Closed β Open: NOT Allowed (e.g., SUCCESSFUL β PROCESSING)
- β Closed β Closed: NOT Allowed (e.g., DECLINED β REFUNDED)
Update Rules Execution
When a transaction status is changed, the endpoint automatically:- Validates the transition - Ensures the new status is valid and transition is allowed
- Updates the status - Changes the transaction status in the database
- Executes status-change rules - Runs rules/matrices with trigger
status_changed(scope action or matrixtransaction_status_changed) - Updates risk score - Re-calculates risk based on rule results
- Returns updated transaction - Returns the complete transaction with new risk assessment
Distinct from field updates:
PATCH /transactions/{id} (metadata, deviceDetails, channel, reason) uses trigger updated. Only this changeStatus endpoint uses status_changed. Migrate rules that should run on status transitions to the new trigger.Rules Trigger
The endpoint usestrigger_transaction_status_changed, which executes rules configured with:
- Loose rules:
scope.triggers[].event.action = "status_changed" - Risk matrices:
triggers[].eventType = "transaction_status_changed"
Complete Request Examples
Approve a Suspended Transaction
Decline a Transaction Under Review
Suspend a Transaction for Manual Review
Response
Success Response (200 OK)
Response Fields
Whether the status change was successful
The updated transaction with all its data, including:
- id (string) - Transaction UUID
- status (string) - New transaction status
- origin (object) - Origin party information (nested structure)
- entityId (string) - Origin entity UUID
- name (string) - Origin party name
- country (string) - Origin country
- details (object) - Additional origin details
- type (string) - Origin entity type
- riskScore (number) - Origin entity risk score
- destination (object) - Destination party information (nested structure)
- entityId (string) - Destination entity UUID
- name (string) - Destination party name
- country (string) - Destination country
- details (object) - Additional destination details
- type (string) - Destination entity type
- riskScore (number) - Destination entity risk score
- riskScore (number) - Updated risk score after re-evaluation
- riskFactors (array) - Updated risk factors
- flagged (boolean) - Updated flag status
- updatedAt (string) - Timestamp of the update
Information about the status transition:
- from (string) - Previous status
- to (string) - New status
At the root of the response (aligned with Create transaction). Only present when rules ran. Summary of which rules matched (hit) vs did not match (no hit), executed actions, and total score.
- rulesHit (array) - Rules whose conditions were met. Each item: name, description, score, priority, category, status, conditions, actions.
- rulesNoHit (array) - Rules evaluated but conditions not met. Same structure as rulesHit.
- actionsExecuted (object) - Aggregated executed actions: alerts, suggestion, status, assignedUser, customKeys (array of strings, optional) β custom action keys from rules that matched; for integrations/workflows.
- totalScore (number) - Sum of score of all rules that hit (excluding shadow).
Error Responses
400 Bad Request - Invalid Status
400 Bad Request - Invalid Transition
404 Not Found
401 Unauthorized
500 Internal Server Error
Use Cases
1. Manual Review Workflow
2. Automated Compliance Check
3. Fraud Detection Response
4. Bulk Status Updates
Best Practices
- Validate before changing - Always check the current status before attempting a status change to avoid unnecessary API calls
- Handle transition errors - Implement proper error handling for invalid transitions, as closed transactions cannot be reopened
- Use appropriate statuses - Choose the correct status that reflects the actual business state of the transaction
-
Monitor rule execution - Pay attention to
rulesExecutionSummaryto ensure update rules are triggering as expected and check execution details, warnings, and metadata - Implement audit logging - Track all status changes in your system for compliance and debugging purposes
- Bulk updates - When updating multiple transactions, use Promise.allSettled() to continue processing even if some updates fail
- Webhook integration - Consider setting up webhooks to receive notifications when status changes trigger important rules
- Testing state transitions - Test all possible state transitions in your development environment before deploying to production
Related Endpoints
Create Transaction
Create new transactions
Get Transaction
Retrieve transaction details
Rules Configuration
Configure update rules
Overview
Back to overview