Skip to main content
GET
/
transactions
/
{id}
Get Transaction
curl --request GET \
  --url http://api.gu1.ai/transactions/{id} \
  --header 'Authorization: Bearer <token>'
{
  "transaction": {},
  "baseCurrency": "<string>"
}

Overview

Returns one transaction for your organization. The response shape uses nested origin and destination objects (with resolved entity data when available). This differs from Create transaction, which uses flatter originDetails / destinationDetails on the request body. The rules engine is not run on read: there is no rulesExecutionSummary on this response.

Endpoints

MethodEndpointUse when
By IDGET /transactions/{id}You have gu1’s transaction UUID
By external IDGET /transactions/external/{externalId}You only have your own externalId from create
Both return the same JSON shape: { "transaction": { ... }, "baseCurrency": "..." }.

Get by ID

GET http://api.gu1.ai/transactions/{id}
id
string
required
Transaction UUID in gu1 (same as transaction.id from create).

Get by external ID

GET http://api.gu1.ai/transactions/external/{externalId}
externalId
string
required
The externalId you sent when creating the transaction.

Authentication

Requires a valid API key and permission to read transactions (transactions:read):
Authorization: Bearer YOUR_API_KEY
The transaction must belong to the organization tied to your key. Otherwise the API responds with 404.

Response (200 OK)

transaction
object
Full transaction record.
  • id (string) β€” gu1 transaction UUID
  • externalId (string) β€” your external identifier
  • type, status β€” enums (same semantics as create)
  • amount (number), currency (string)
  • amountInUsd (number | null) β€” converted amount when available
  • currenciesExchange (array) β€” per-currency conversion entries { currency, exchangeRate, value }
  • paymentMethod (string | null)
  • origin (object) β€” entityId, externalId, name, country, type (person | company | null), taxId, riskScore, details (object; includes payment-related data you stored)
  • destination (object) β€” same structure as origin
  • riskScore (number | null)
  • lastRiskEvaluationAt (string | null) β€” ISO timestamp of the latest risk analysis audit for this transaction (present on GET by UUID; omitted when fetching by external ID)
  • riskFactors (array) β€” structured reasons / matches from the last evaluation
  • activeMatchesCount, shadowMatchesCount (number, optional) β€” when present on stored evaluation metadata
  • hitRuleExternalIds (string[], optional) β€” external IDs of rules that matched
  • flagged (boolean)
  • locationDetails, deviceDetails (object)
  • channel (string | null), description, category, metadata (object)
  • transactedAt, createdAt, updatedAt (ISO strings)
  • exchangeRate, rateSource, rateTimestamp, convertedAt β€” conversion metadata when applicable
baseCurrency
string
Organization base currency (ISO code, e.g. USD), used as reference for multi-currency displays.

Example (by ID)

curl -s http://api.gu1.ai/transactions/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "transaction": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "externalId": "txn_12345",
    "type": "PAYMENT",
    "status": "CREATED",
    "amount": 150.5,
    "currency": "USD",
    "amountInUsd": 150.5,
    "currenciesExchange": [],
    "paymentMethod": "CARD",
    "origin": {
      "entityId": "…",
      "externalId": "customer_001",
      "name": "Jane Doe",
      "country": "US",
      "type": "person",
      "taxId": null,
      "riskScore": 12.5,
      "details": {}
    },
    "destination": {
      "entityId": "…",
      "externalId": "merchant_456",
      "name": "Acme Store",
      "country": "US",
      "type": "company",
      "taxId": null,
      "riskScore": 8,
      "details": {}
    },
    "riskScore": 15,
    "lastRiskEvaluationAt": "2025-01-15T10:00:00.000Z",
    "riskFactors": [],
    "flagged": false,
    "locationDetails": {},
    "deviceDetails": {},
    "channel": "web_browser",
    "description": "Online purchase",
    "category": "retail",
    "metadata": {},
    "transactedAt": "2025-01-15T09:55:00.000Z",
    "createdAt": "2025-01-15T09:55:01.000Z",
    "updatedAt": "2025-01-15T09:55:01.000Z",
    "exchangeRate": null,
    "rateSource": null,
    "rateTimestamp": null,
    "convertedAt": null
  },
  "baseCurrency": "USD"
}

Error responses

404 β€” Not found

{
  "error": "Transaction not found"
}
Returned when the ID does not exist or belongs to another organization.

500 β€” Server error

{
  "error": "Failed to fetch transaction",
  "details": "…"
}