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

# Detalle tarjeta

> Endpoint para obtener los detalles de una tarjeta de crédito o débito registrada en OnePay.

<ParamField path="card_id" type="string" required placeholder="bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5">
  ID de la tarjeta tokenizada. [Ver cómo registrar tarjetas](/client/cards/create).
</ParamField>

<Tabs>
  <Tab title="curl">
    ```bash theme={null}
    curl https://api.onepay.la/v1/cards/bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5 \
      -H "Authorization: Bearer sk_test_xxx"
    ```
  </Tab>

  <Tab title="JavaScript">
    ```ts theme={null}
    const response = await fetch(
      'https://api.onepay.la/v1/cards/bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5',
      {
        headers: {
          'Authorization': 'Bearer sk_test_xxx',
        },
      }
    );
    const card = await response.json();
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.get(
        'https://api.onepay.la/v1/cards/bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5',
        headers={'Authorization': 'Bearer sk_test_xxx'},
    )
    card = response.json()
    ```
  </Tab>
</Tabs>

<ResponseField name="id" type="string">
  Identificador único de la tarjeta (UUID).
</ResponseField>

<ResponseField name="brand" type="string">
  Marca de la tarjeta. Valores posibles: `Visa`, `Mastercard`, `Amex`, `Diners`.
</ResponseField>

<ResponseField name="label" type="string">
  Etiqueta de la tarjeta en formato `Marca • últimos 4 dígitos`.
</ResponseField>

<ResponseField name="last_four" type="string">
  Últimos 4 dígitos de la tarjeta.
</ResponseField>

<ResponseField name="expiration_date" type="string">
  Fecha de expiración en formato `MM/YYYY`.
</ResponseField>

<ResponseField name="customer_id" type="string">
  ID del cliente (guest) al que pertenece la tarjeta.
</ResponseField>

<ResponseField name="created_at" type="string">
  Fecha de creación en formato ISO 8601.
</ResponseField>

<ResponseField name="country" type="string">
  Código de país de emisión de la tarjeta (ISO 3166-1 alpha-2).
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "9e01eeae-2868-4564-9d04-84d1d1d027d2",
    "brand": "Mastercard",
    "label": "Mastercard • 8099",
    "last_four": "8099",
    "expiration_date": "9/2026",
    "customer_id": "9df8018b-6a28-4696-b7b2-63615f34a2f5",
    "created_at": "2025-01-19T18:29:25.000000Z",
    "country": "CO"
  }
  ```

  ```json 404 theme={null}
  {
    "message": "Tarjeta no encontrada",
    "code": 10004,
    "code_name": "not_found"
  }
  ```
</ResponseExample>
