> ## Documentation Index
> Fetch the complete documentation index at: https://pay3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/transactions/:id — Get Transaction Details

> GET /api/transactions/:id — returns full details for a single transaction including Stellar hash, policy decision, approval record, and timestamps.

Retrieve the complete record for a single AI-initiated transaction. In addition to the fields returned by the list endpoint, the detail view includes the embedded approval request (if one exists), failure reasons, and precise timestamps for each stage of the submission pipeline. Use this endpoint when investigating a specific transaction — for example, to diagnose a failure, confirm on-chain settlement, or understand why a transaction was held for approval.

## Endpoint

```
GET /api/transactions/:id
```

## Authentication

All requests must include a valid bearer token in the `Authorization` header, or a `pay3_session` cookie obtained during wallet authentication.

```
Authorization: Bearer <token>
```

## Path parameters

**id** `string` *required*

The UUID of the transaction to retrieve.

## Response

Returns a single transaction object with all available fields. Returns `404 Not Found` if the transaction does not exist or does not belong to your account.

### Response fields

**id** `string` *required*

Unique UUID for this transaction.

**action** `string` *required*

The operation type. One of `TRANSFER`, `CHECK_BALANCE`, or `VIEW_TRANSACTION_HISTORY`. See [GET /api/transactions](https://pay3.mintlify.site/api-reference/transactions/list.md) for full descriptions.

**asset** `string` *required*

Ticker of the asset involved, e.g. `"USDC"` or `"XLM"`.

**amount** `string`

Transfer amount as a decimal string. May be `null` for non-transfer actions.

**recipientAddress** `string`

Resolved destination Stellar address (G-address). `null` for non-transfer actions.

**recipientInput** `string`

The raw recipient value originally provided by the AI — may be an alias, display name, or Stellar address.

**status** `string` *required*

Lifecycle status. One of `CREATED`, `VALIDATING`, `AUTO_APPROVED`, `PENDING_APPROVAL`, `APPROVED`, `SIGNING`, `SUBMITTING`, `SUCCESS`, `FAILED`, `REJECTED`, `EXPIRED`, or `CANCELLED`. See [GET /api/transactions](https://pay3.mintlify.site/api-reference/transactions/list.md) for full status descriptions.

**policyDecision** `string` *required*

The decision reached by the policy engine when the transaction was first evaluated:

* `AUTO_EXECUTE` — the transaction was within all limits and was submitted without requiring your approval
* `PENDING_APPROVAL` — the transaction exceeded the `manualApprovalThreshold` and was routed to the approval queue
* `REJECTED` — the transaction violated a policy rule and was blocked before submission

**stellarTransactionHash** `string`

The Stellar transaction hash. Populated once status is `SUCCESS`. `null` for all other statuses.

**rejectionReason** `string`

Human-readable explanation of why the transaction failed or was rejected. Populated when `status` is `FAILED` or `REJECTED`. `null` for all other statuses.

**aiSessionId** `string` *required*

UUID of the AI session that submitted this transaction.

**aiSession** `object` *required*

Summary of the AI session that submitted this transaction.

**aiSession fields**

**id** `string` *required*

UUID of the AI session.

**clientType** `string` *required*

AI client type (e.g. `"CURSOR"`, `"CLAUDE"`).

**approvalRequest** `object`

The approval request record associated with this transaction, if one was created (i.e. `policyDecision` is `PENDING_APPROVAL`). `null` if the transaction was auto-executed or rejected before reaching the approval stage.

**approvalRequest fields**

**id** `string` *required*

UUID of the approval request.

**status** `string` *required*

Approval request status. One of `PENDING`, `APPROVED`, `EXPIRED`, or `CANCELLED`.

**expiresAt** `string` *required*

ISO 8601 timestamp after which the approval request expires.

**approvedAt** `string`

ISO 8601 timestamp when you approved the request. `null` if not yet approved.

**createdAt** `string` *required*

ISO 8601 timestamp when the approval request was created.

**createdAt** `string` *required*

ISO 8601 timestamp when the transaction record was created.

**completedAt** `string`

ISO 8601 timestamp when the transaction reached a terminal state (`SUCCESS`, `FAILED`, `REJECTED`, `EXPIRED`, or `CANCELLED`). `null` if still in progress.

## Error responses

| Status | Meaning |
| - | - |
| `400 Bad Request` | The provided `id` is not a valid UUID. |
| `401 Unauthorized` | Missing or invalid bearer token. |
| `404 Not Found` | No transaction exists for the given `id` on your account. |

## Example request

```bash theme={null}
curl https://api.pay3.dev/api/transactions/d4e5f6a7-abcd-1234-ef56-789012345678 \
  -H "Authorization: Bearer <token>"
```

## Example response — successful transaction

```json theme={null}
{
  "id": "d4e5f6a7-abcd-1234-ef56-789012345678",
  "action": "TRANSFER",
  "asset": "USDC",
  "amount": "42.5000000",
  "recipientAddress": "GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "recipientInput": "alice",
  "status": "SUCCESS",
  "policyDecision": "AUTO_EXECUTE",
  "stellarTransactionHash": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
  "rejectionReason": null,
  "aiSessionId": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
  "aiSession": {
    "id": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
    "clientType": "CURSOR"
  },
  "approvalRequest": null,
  "createdAt": "2025-07-08T12:00:00.000Z",
  "completedAt": "2025-07-08T12:00:06.891Z"
}
```

## Example response — pending approval

```json theme={null}
{
  "id": "c3b2a1f0-9876-5432-fedc-ba0987654321",
  "action": "TRANSFER",
  "asset": "USDC",
  "amount": "75.0000000",
  "recipientAddress": "GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "recipientInput": "GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "PENDING_APPROVAL",
  "policyDecision": "PENDING_APPROVAL",
  "stellarTransactionHash": null,
  "rejectionReason": null,
  "aiSessionId": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
  "aiSession": {
    "id": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
    "clientType": "CURSOR"
  },
  "approvalRequest": {
    "id": "apr1a2b3c4-0001-4abc-8def-000000000050",
    "status": "PENDING",
    "expiresAt": "2025-07-08T14:32:00.000Z",
    "approvedAt": null,
    "createdAt": "2025-07-08T14:30:00.000Z"
  },
  "createdAt": "2025-07-08T14:30:00.000Z",
  "completedAt": null
}
```

## Example response — failed transaction

```json theme={null}
{
  "id": "b1a2c3d4-0000-aaaa-bbbb-ccccddddeeee",
  "action": "TRANSFER",
  "asset": "USDC",
  "amount": "999.0000000",
  "recipientAddress": "GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "recipientInput": "GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "FAILED",
  "policyDecision": "AUTO_EXECUTE",
  "stellarTransactionHash": null,
  "rejectionReason": "Transaction amount exceeds daily budget remaining for this session.",
  "aiSessionId": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
  "aiSession": {
    "id": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
    "clientType": "CURSOR"
  },
  "approvalRequest": null,
  "createdAt": "2025-07-08T13:00:00.000Z",
  "completedAt": "2025-07-08T13:00:01.012Z"
}
```

> [!NOTE]
>
> If `policyDecision` is `PENDING_APPROVAL` and `status` is `PENDING_APPROVAL`, the transaction is currently waiting in your [approvals queue](https://pay3.mintlify.site/api-reference/approvals/list.md). It will expire 2 minutes after the approval request was created if not acted upon.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.