> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-payment/integrate-the-d1-api/d1-api-reference/outbound-api-from-d1/card-api.md).

# Card API

[Download D1-Public-OUT-v2-Card.yaml](https://openapi.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/spec/D1-Public-OUT-v2-Card.yaml)

## Get Card Credentials

> API used by D1 to call the CMS for retrieving the card credentials (PAN, expiry date, cardholder name and CVV) using a card identifier.\<br/>It can be used, for example, for displaying the card details to an end user who wants to perform an e-commerce transaction or for registering a 'legacy card' in the D1 system.

```json
{"openapi":"3.0.0","info":{"title":"Outbound Card API","version":"2.0"},"servers":[{"url":"https://YOUR_DOMAIN_NAME"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"A JWT generated by the [Get Authorization Token API](oauth2-api).<br/>The server checks the validity of the provided token to control access to this protected resource. Please refer to [Get OAuth 2.0 access token](../../../integrate-the-d1-api/get-oauth-2.0-access-token) for more details on the flow and on how to get this JWT.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"encryptedDataForGetCardCredentials":{"type":"string","title":"encryptedData (for Get Card Credentials)","maxLength":8192,"description":"The encryptedData is the encrypted json (cf http://www.json.org/ ) representation of the card credentials.<br/>This value is encrypted using the JWE encryption (please refer to the **[Encrypt sensitive data](../../../integrate-the-d1-api/encrypt-sensitive-data)** for more details)<br/><br/><b>Content</b><br/><br/>Once deciphered, the plaintext contains:\n\t\n|JSON field parameter name|description|MOC|Format|\n|-------|-------|-------|-------|\n|pan|The funding pan value.|M|string - from 10 to 19 digits|\n|exp|The expiry date of the card.|M|string - 4 digits, following the format MMYY|\n|name|The card holder name.|O|string - up to  128 characters|\n|cvv|The CVV2 value of the funding card|M|string - 3 or 4 digits|"},"error":{"title":"error","type":"object","description":"An error occurred","properties":{"error":{"type":"string","description":"Detailed description of the error that occurred.\n"}}}}},"paths":{"/cms/api/v1/issuers/{issuerId}/cards/{cardId}/credentials":{"get":{"summary":"Get Card Credentials","operationId":"getCardCredentials","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"encryptedData":{"$ref":"#/components/schemas/encryptedDataForGetCardCredentials"}},"required":["encryptedData"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Authorization missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"403":{"description":"Action forbidden (if card is not active, for example)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Resource not found (issuerId, cardId)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"description":"API used by D1 to call the CMS for retrieving the card credentials (PAN, expiry date, cardholder name and CVV) using a card identifier.<br/>It can be used, for example, for displaying the card details to an end user who wants to perform an e-commerce transaction or for registering a 'legacy card' in the D1 system.","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"Oauth Access Token (optional)"}]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-payment/integrate-the-d1-api/d1-api-reference/outbound-api-from-d1/card-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
