GET /v1/cards and GET /v1/cards/{id} never return full PAN or CVV. They only include safe fields such as lastFour, status, and expiry label.
To show the full number, expiry, and CVV you use one of the two reveal methods below. Pick based on whether sensitive data may touch your servers.
Which method should I use?
API Reference endpoints for both methods live under Cards — reveal PAN/CVV.
Method 1 — Widget.js (recommended)
Your servers receive a short-livedrevealToken only. The browser loads Apocor Widget.js; PAN/CVV render inside PCI iframes and never pass through your backend.
Steps
- Authenticate → Bearer token (Authentication).
- Call
GET /v1/cards/{id}/secure-details. - Load the Apocor Widget SDK (sandbox vs live must match the token environment).
- Call
widget.bootstrap({ clientAccessToken: revealToken, ... }). - Ask Apocor to allowlist your page origin (the domain of your app, not
api.apocor.ai).
Get a reveal token
cURL
Widget SDK URLs
Optional CDN (same paths):
https://static.apocor.ai/sdk/card/...
Reference (API Reference → Cards — reveal PAN/CVV):
GET …/secure-details ·
Widget.js sandbox ·
Widget.js live.
Frontend example
Method 2 — Server-side encrypted reveal (PCI DSS Level 1)
Apocor never returns plaintext PAN/CVV over HTTP. You send an RSA public key; we return a hybrid encrypted envelope. Decrypt only inside a PCI-scoped environment (HSM/KMS for the private key). Requires:pciRevealEnabled = true on your organization (ask Apocor after PCI attestation).
Algorithm: RSA_OAEP_SHA256_AES_256_GCM
Steps
- Generate an RSA-2048+ key pair; keep the private key in HSM/KMS.
POST /v1/cards/{id}/payment-detailswithencryption.public_key_pem.- Unwrap
encryptedKeywith RSA-OAEP (SHA-256). - Decrypt
ciphertextwith AES-256-GCM usingiv+authTag.
POST …/payment-details.
Request
cURL