---
title: "View card sensitive details"
description: "Retrieve encrypted sensitive card details, such as `cvv` and `card_number`."
protocol: rest
method: GET
endpoint: "/v1/cards/{card_id}/sensitive-details"
baseUrl: "https://api.gravv.xyz"
group: "Cards"
auth:
  label: "Api-Key"
  name: "Api-Key"
  in: header
---

# View card sensitive details

<Endpoint method="GET" path="/v1/cards/{card_id}/sensitive-details" />

Retrieve encrypted sensitive card details, such as `cvv` and `card_number`.

**Security Requirements:**

1. Generate RSA key pair (2048-bit minimum).
2. Base64-encode the PEM-formatted public key, including the
   `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`
   markers and the newlines between them.

3. Send encoded public key in `X-Client-Public-Key` header.
4. Server returns `cvv` and `card_number` encrypted with your
   public key.

5. Decrypt response using your private key.

## Headers

<ParamField name="X-Client-Public-Key" header="X-Client-Public-Key" type="string" required>
  Base64-encoded PEM-formatted RSA public key used to encrypt the response. Encode the entire `public.pem` file contents, including the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` markers and the newlines between them.
</ParamField>

## Path Parameters

<ParamField name="card_id" path="card_id" type="string" required>
  The ID of the card to retrieve sensitive details for
</ParamField>

## Request Body

### Request Examples

<RequestExample>

```json title="Request"
{}
```

</RequestExample>

## Responses

| Status | Description |
| --- | --- |
| `200` | Encrypted card sensitive details retrieved successfully |

### 200 response

<ResponseField name="data" type="object">

  <Expandable title="properties">
    <ResponseField name="ciphertext" type="string">
      Base64 value that holds the AES-GCM encrypted card details and includes integrity protection
    </ResponseField>

    <ResponseField name="encrypted_key" type="string">
      Base64 value of the AES key encrypted with the client's public key
    </ResponseField>

    <ResponseField name="nonce" type="string">
      Base64 value of the nonce required for AES GCM decryption
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="error" type="null">
</ResponseField>

<ResponseExample>

```json title="Response"
{
  "data": {
    "ciphertext": "IjBkZlJMWUVXMzJ5MjdySzhWQlp1WHM5N1hzZ0szNGFSb1VScTJrbDhyazkzSmUrM0lTTXNiOCs4bmo2MW9LdDYxdkN0d0w1NSI=",
    "encrypted_key": "IkUxdXhGa2c3ekpVaUJmWFlhcnVhM0dZRyt1amZJczBpMDJsak85QnIvVjkzSGxvWWxDNk1xaVlyYkNGQnJtTHFkVkwybmlFbkxDemliOUoweWI3RTg5YUFvTEZncmFkNFV0Z2cvV1ZUK29HbGZPZWRJVnREU1ZvSmNWaDMrSExnSUMybnBaTWJkelpualB6b21PcThCcGpNN09yWG1FeHUvd3pHblhpYXIyRT0i",
    "nonce": "Img2M29JSVVESTZ2aS90S2si"
  },
  "error": null
}
```

</ResponseExample>

## Authorization

- **ApiKeyAuth**
