To stay in PCI compliance, you need to tokenize the card to show the full card information including card number, expiry and CVV. We have partnered with VGS to bring this functionality to you.
There are two steps involved in showing the full card information:
Step 1: Create a Show Token
Step 2: Show a Card
Step 1: Create a Show Token
ENDPOINT
- POST /v1/card/:id/showtoken
RESPONSE
- {
- "id": "crd-7b7df7c0-2adf-46f2-8110-15c903030267",
- "showToken": "card-show-test-66449e66-14b5-4f9e-838c-74807268db09"
- }
Step 2: Show a Card
Note: If you are PCI Compliant, you can directly use the API. If you are not, see the steps below to show the card information to your end user by staying out of scope.
ENDPOINT
- GET https://tntbevlgikb.sandbox.verygoodproxy.com/v1/card/:id/show
Do not include the sd-api-key and sd-person-id in the header. Include sd-show-token (it is the showToken that you receive in Step 1). Token is valid for 5 minutes and can be used only once.
See example of the cURL request below:
- curl --location --request GET 'https://tntbevlgikb.sandbox.verygoodproxy.com/v1/card/crd-7b7df7c0-2adf-46f2-8110-15c903030267/show' \
- --header 'sd-show-token: card-show-test-1b9c92ae-4d0c-4eb0-9ed0-859c7c3a9b0f' \
- --data-raw ''
Note: In LIVE mode, replace sandbox with live in the URL. Please create a ticket and solid tech support will share the LIVE vault id to include at the start of the URL.
RESPONSE
- {
- "id": "crd-7b7df7c0-2adf-46f2-8110-15c903030267",
- "cardNumber": "6088850019458041",
- "cvv": "837",
- "expiryMonth": "12",
- "expiryYear": "2022"
- }
How to use VGS Show with to view a Solid card
Step 1: Add the VGS Show SDK to your app
The VGS Show SDK allows displaying PCI-sensitive card data by keeping customers out of scope. This model enables unredacted PCI data to flow through the VGS network, preventing sensitive information from flowing through the customer's network.
Links:
Web SDK : https://www.verygoodsecurity.com/docs/vgs-show/js
Android SDK : https://www.verygoodsecurity.com/docs/vgs-show/android-sdk
iOS SDK : https://www.verygoodsecurity.com/docs/vgs-show/ios-sdk
Note: The VGS widget allows for customization to your UI specifications.
Step 2: Create a Show Token (see above)
Note: The show token call must be made via the API from your server, not from the client
Step 3: Call the Show a Card api via VGS SDK
Call the Solid Platform's Card Show API from inside the VGS SDK with the above token (see Show a Card)
Sample VGS Web Config
- // Show.js script file
- <script type="text/javascript" src="https://js.verygoodvault.com/vgs-show/1.3/{org-id}.js">
- </script>
- // Show.js initialization
- const show = VGSShow.create('<vault-id>', function(state) {
- console.log(state);
- });
- // Request configuration
- const iframe = show.request({
- name: '<name-of-request>',
- method: 'GET',
- headers: {
- sd-show-token: {{showToken}}
- },
- path: '/v1/card/<card-id>/show',
- payload: {'card_number': '<alias>'},
- htmlWrapper: 'text',
- jsonPathSelector: 'json.card_number'
- });
- Sample Response
- {
- "id": "crd-4c5817af-33c2-4a60-8bad-33fbc57db9ad",
- "cardNumber": "4000009990005152",
- "cvv": "123",
- "expiryMonth": "06",
- "expiryYear": "2024"
- }