> ## 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.

# Obtener detalles de la transacción

> Este endpoint obtiene información detallada de una transacción específica

### Parámetros

<ParamField path="transactionId" type="string" required>
  El identificador único de la transacción
</ParamField>

### Respuesta

<ResponseField name="success" type="boolean">
  Indica si la operación fue exitosa
</ResponseField>

<ResponseField name="transactionId" type="string">
  Identificador único de la transacción
</ResponseField>

<ResponseField name="cardId" type="string">
  El ID de la tarjeta usada en la transacción
</ResponseField>

<ResponseField name="userId" type="string">
  El ID de usuario del titular de la tarjeta
</ResponseField>

<ResponseField name="amount" type="number">
  Monto de la transacción
</ResponseField>

<ResponseField name="currency" type="string">
  Código de moneda de la transacción (por ejemplo, "USD")
</ResponseField>

<ResponseField name="status" type="string">
  Estado de la transacción: `pending`, `approved`, `declined` o `reversed`
</ResponseField>

<ResponseField name="merchantName" type="string">
  Nombre del comercio
</ResponseField>

<ResponseField name="merchantCategory" type="string">
  Código de categoría del comercio (MCC)
</ResponseField>

<ResponseField name="merchantCity" type="string">
  Ciudad donde se ubica el comercio
</ResponseField>

<ResponseField name="merchantCountry" type="string">
  Código de país donde se ubica el comercio
</ResponseField>

<ResponseField name="type" type="string">
  Tipo de transacción: `purchase`, `refund`, `withdrawal`, etc.
</ResponseField>

<ResponseField name="declineReason" type="string">
  Motivo del rechazo (presente solo si el estado es `declined`)
</ResponseField>

<ResponseField name="createdAt" type="string">
  Fecha y hora (ISO 8601) de cuándo se creó la transacción
</ResponseField>

<ResponseField name="settledAt" type="string">
  Fecha y hora (ISO 8601) de cuándo se liquidó la transacción (si aplica)
</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>

### Respuestas de error

<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>
