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

# Get Transaction Details

> This endpoint retrieves detailed information about a specific transaction

### Params

<ParamField path="transactionId" type="string" required>
  The unique transaction identifier
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the call was successful
</ResponseField>

<ResponseField name="transactionId" type="string">
  Unique transaction identifier
</ResponseField>

<ResponseField name="cardId" type="string">
  The card ID used for the transaction
</ResponseField>

<ResponseField name="userId" type="string">
  The user ID of the cardholder
</ResponseField>

<ResponseField name="amount" type="number">
  Transaction amount
</ResponseField>

<ResponseField name="currency" type="string">
  Transaction currency code (e.g., "USD")
</ResponseField>

<ResponseField name="status" type="string">
  Transaction status: `pending`, `approved`, `declined`, or `reversed`
</ResponseField>

<ResponseField name="merchantName" type="string">
  Name of the merchant
</ResponseField>

<ResponseField name="merchantCategory" type="string">
  Merchant category code (MCC)
</ResponseField>

<ResponseField name="merchantCity" type="string">
  City where the merchant is located
</ResponseField>

<ResponseField name="merchantCountry" type="string">
  Country code where the merchant is located
</ResponseField>

<ResponseField name="type" type="string">
  Transaction type: `purchase`, `refund`, `withdrawal`, etc.
</ResponseField>

<ResponseField name="declineReason" type="string">
  Reason for decline (only present if status is `declined`)
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp when the transaction was created
</ResponseField>

<ResponseField name="settledAt" type="string">
  ISO 8601 timestamp when the transaction was settled (if applicable)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/transactions/txn_1a2b3c4d5e6f7g8h' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>'
  ```

  ```js Javascript theme={null}
  const response = await fetch('https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/transactions/txn_1a2b3c4d5e6f7g8h', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'api-key': '<api-key>'
    }
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "transactionId": "txn_1a2b3c4d5e6f7g8h",
    "cardId": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
    "userId": "3ddd0e5b-6276-4b48-b756-c1fcc9a2efd1",
    "amount": 49.99,
    "currency": "USD",
    "status": "approved",
    "merchantName": "Amazon.com",
    "merchantCategory": "5942",
    "merchantCity": "Seattle",
    "merchantCountry": "US",
    "type": "purchase",
    "createdAt": "2024-01-15T14:23:45Z",
    "settledAt": "2024-01-16T02:00:00Z"
  }
  ```
</ResponseExample>

### Error Responses

<ResponseExample>
  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized. Please check your authentication credentials."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "Transaction not found."
  }
  ```
</ResponseExample>
