Display card details
Last updated: January 22, 2025
Card details, or credentials, include the unique 16-digit primary account number (PAN) and the security code (CVV).
You can display these details in the following ways:
If you've integrated the Issuing Android SDK or iOS SDK into your app, you can enable your cardholders to view their card details through your app.
Follow these steps:
- Authenticate the cardholder.
- Retrieve the cardholder's cards.
- Retrieve and display secure card details.
You are responsible for authenticating the cardholder for each session where they use functionality provided by the SDK, in both the sandbox and live SDK environments. To do this, use an access token that your app receives from your authentication back end.
Note
In the iOS SDK stub environment, you can provide any String
instead of an access token, because all responses return mock data.
The Android SDK does not provide a stub environment.
1val token = "<ACCESS_TOKEN>"2cardManager.logInSession(token)
Once you’ve authenticated the cardholder and your app, you can retrieve a list of their cards:
1cardManager.getCards { result: Result<List<Card>> ->2result.onSuccess {3// You receive a list of cards that you can display in your UI4// The card details include the last four digits of the PAN, expiry date, cardholder name, card state, and card ID5}.onFailure {6// If something goes wrong, you receive an error with more information7}8}
Once you've retrieved a cardholder's cards, you can retrieve the cards' secure details, including:
- The last four digits of the PAN
- The expiry date
- The cardholder's name
- The card's state –
active
,inactive
,revoked
, orsuspended
- The card's unique ID
You must make separate API calls to retrieve the PIN, PAN, CVV, and joint PAN and CVV data.
Each API call is subject to a unique Strong Customer Authentication (SCA) flow. When an authentication flow is completed, you can request a single-use token to provide to the SDK to execute the call.
1val singleUseToken = "<SINGLE_USE_TOKEN_RETRIEVED_AFTER_SCA>"23// Request sensitive data via the card object4card.getPin(singleUseToken) { result: Result<AbstractComposeView> ->5result6.onSuccess {7// Receives a UI component that you can display to the user8}.onFailure {9// If something goes wrong, you receive an error with more information10}11}
The UI component protects the returned value and delivers it directly to the user. The sensitive card details are never displayed to you, or sent to your server.
The UI component's visuals are defined by the values you provided to CardManagementDesignSystem
when you integrated the Android SDK or iOS SDK.
- Sign in to the Dashboard and ensure you have permission to view card details.
- Go to Issuing > Cards.
- Use the search or filters to find the relevant card.
- Select the card to view its details.
- Select View card credentials.
If you have the Administrator role, you can also grant users permission to view card details. For security reasons, no pre-defined roles include this permission by default.
You need to create a custom role, with the View card number and CVC2 permission, and assign it to your users.
If you're a regulated entity or you issue cards to your business, you can display the card details using the API.
Call the Get the card credentials endpoint, and provide the following:
cardId
path parameter – The unique identifier for the card.credentials
query parameter – The card credentials you want to retrieve.
post
https://api.checkout.com/issuing/cards/{cardId}/credentials?credentials=number,cvc2