Reverse Transaction
Reverse a completed transaction. This creates a new audit entry and updates both agents' records accordingly.
POST/transactions/{transaction_id}/reverse
Reverse a completed transaction. Creates a new audit entry and updates both agents' records.
Requires API key authentication
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| transaction_id | string | required | The unique identifier of the transaction to reverse. |
Reversals are permanent and create their own audit trail. Only completed transactions can be reversed.
Response Example
Response
{ "id": "tx_r8s9t0u1", "agent_id": "agent_7f3k9x2m", "agent_name": "Trading Agent Alpha", "counterparty_id": "agent_p2q3r4s5", "amount": 2500.00, "currency": "USD", "action_type": "execute_trades", "status": "reversed", "permissions_checked": true, "audit_hash": "sha256:tx_hash_abc...", "notes": null, "created_at": "2025-01-15T14:30:00Z", "reversed_at": "2025-01-16T09:00:00Z", "reversal_audit_hash": "sha256:reversal_hash_abc..."}Code Examples
BASH
curl -X POST https://api.alsorn.com/transactions/tx_r8s9t0u1/reverse \ -H "Authorization: Bearer YOUR_API_KEY"