Skip to main content
Use GET /cards/{cardId}/secrets when your app needs to display the full card number or CVC. GET /cards/{cardId} only returns card metadata such as status, last4, expiry, type, and PIN state. The secrets endpoint never returns plaintext PAN or CVC. It uses the same session setup as Managing a card’s PIN:
  • Fetch your business RSA public key from GET /business/pin-crypto-key.
  • Generate a 32-character hex sessionKey locally.
  • Save sessionKey until you have decrypted the response (same key as for PIN flows).
  • Encrypt the session key with the public key and send it as the SessionId header.
  • Decrypt encryptedPan and encryptedCvc locally with the saved raw session key.

Request

GET /cards/CARD_ID/secrets

Response

Decrypt PAN and CVC

Use the same sessionKey you generated and saved for this request. Unlike PIN retrieval, PAN and CVC are decrypted as plain values and do not use PIN block formatting.
decrypt-card-secret.js