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

# Retrieve card by PAN

> Retrieves the usertoken and cardtoken for a primary account number (PAN).

<div className="mb-4 flex items-center gap-2"><span className="rounded-lg font-bold px-1.5 py-0.5 text-sm leading-5 bg-blue-400/20 text-blue-700 dark:text-blue-400">POST</span><span className="flex items-center gap-0.5 font-mono text-sm"><span className="text-gray-400">/</span><span className="font-medium text-gray-800 dark:text-white">{"cards"}</span><span className="text-gray-400">/</span><span className="font-medium text-gray-800 dark:text-white">{"getbypan"}</span></span></div>

Retrieves the `user_token` and `card_token` for a primary account number (PAN). In the case of a reissued card, where multiple cards share the same PAN, the information for the most recently issued card is returned.

This request is useful in IVR scenarios where a user has telephoned and identifies the card by the PAN. The retrieval of these tokens is implemented as a `POST` request because supplying the PAN in the request body is more secure than supplying it in the URL (as would be required with a `GET`).

<Danger>
  **Warning**<br />Sending a request to this endpoint requires PCI DSS compliance. You must comply with PCI DSS data security requirements if you want to store, transmit, or process sensitive card data such as the cardholder's primary account number (PAN), personal identification number (PIN), and card expiration date.
</Danger>

<h2 id="_request_body_2">
  Request body
</h2>

| Fields | Description |
| - | - |
| cvv\_number<br />string<br />Optional | Three-digit card verification value (CVV2) included on the back of the card.<br />This value cannot be updated.<br />**Allowable Values:**<br />3 char max |
| expiration<br />string<br />Optional | Card expiration date.<br />**Allowable Values:**<br />Format: MMyy |
| pan<br />string<br />Required | Primary account number (PAN) of the card whose information you want to retrieve.<br />Send a `GET` request to `/cards/{token}/showpan` to retrieve the PAN for a specific card.<br />**Allowable Values:**<br />16 char max |

<h2 id="_sample_request_body_2">
  Sample request body
</h2>

```json JSON lines wrap theme={null}
{
  "pan": "5454545454545454"
}
```

<h2 id="_response_body_4">
  Response body
</h2>

| Fields | Description |
| - | - |
| card\_token<br />string<br />Returned | Unique identifier of the card.<br />**Allowable Values:**<br />Existing card token |
| created\_time<br />datetime<br />Returned | Date and time when the resource was created, in UTC.<br />**Allowable Values:**<br />datetime<br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ |
| last\_modified\_time<br />datetime<br />Returned | Date and time when the resource was last modified, in UTC.<br />**Allowable Values:**<br />datetime<br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ |
| user\_token<br />string<br />Returned | Unique identifier of the cardholder.<br />**Allowable Values:**<br />Existing user token |

<h2 id="_sample_response_body_4">
  Sample response body
</h2>

```json JSON lines wrap theme={null}
{
  "user_token": "my_user",
  "card_token": "my_card1",
  "created_time": "2022-02-26T20:03:15Z",
  "last_modified_time": "2022-02-26T20:05:20Z"
}
```


## Related topics

- [Cards Overview](/docs/core-api/cards.md)
- [Show card PAN](/docs/core-api/cards/show-pan.md)
- [Retrieve digital wallet token PAN](/docs/core-api/digital-wallets-management/retrieve-token-pan.md)
- [Retrieve digital wallet token with PAN visible](/docs/core-api/tokenization-as-a-service/retrieve-digital-wallet-token-with-pan-visible.md)
- [Retrieve card](/docs/core-api/cards/retrieve.md)
