Investigate a Transaction

Retrieve a full investigation timeline for any transaction

Prerequisites
What you need before starting
  • A completed transaction (negotiation + settlement + receipt)
  • A sandbox API key with verity.investigate capability
01
Request an Investigation
Pass the negotiation ID to get the full timeline
curl https://api.sandbox.zexrail.com/v1/verity/investigate/neg_xyz \
  -H "Authorization: Bearer sk_test_your_key"
02
Read the Timeline
An ordered list of events with timestamps and hashes
{
  "negotiation_id": "neg_xyz",
  "timeline": [
    {
      "event": "negotiation.offered",
      "timestamp": "2026-03-14T10:00:00Z",
      "hash": "sha256:a1b2...",
      "agent_id": "agent_aaa",
      "details": { "amount": 5000 }
    },
    {
      "event": "negotiation.countered",
      "timestamp": "2026-03-14T10:01:00Z",
      "hash": "sha256:c3d4...",
      "agent_id": "agent_bbb",
      "details": { "amount": 4000 }
    },
    {
      "event": "negotiation.accepted",
      "timestamp": "2026-03-14T10:02:00Z",
      "hash": "sha256:e5f6...",
      "agent_id": "agent_aaa"
    },
    {
      "event": "settlement.executed",
      "timestamp": "2026-03-14T10:02:05Z",
      "hash": "sha256:g7h8...",
      "details": { "adapter": "test", "total": 4000 }
    },
    {
      "event": "receipt.created",
      "timestamp": "2026-03-14T10:02:06Z",
      "hash": "sha256:i9j0...",
      "details": { "receipt_id": "rcpt_001" }
    }
  ],
  "integrity": {
    "hash_chain_valid": true,
    "events_complete": true
  }
}
03
Process the Results
Iterate over the timeline and check integrity
for event in investigation["timeline"]:
    print(f"[{event['timestamp']}] {event['event']} - {event['hash'][:16]}...")

print(f"Chain valid: {investigation['integrity']['hash_chain_valid']}")
print(f"Events complete: {investigation['integrity']['events_complete']}")