Manage card security
The cardholder data security and safety are critical to maintaining compliance with the Payment Card Industry Data Security Standard (PCI DSS) and protecting users from fraud or data breaches.
Sensitive cardholder data, such as the Primary Account Number (PAN) and Card Verification Value (CVV), must be handled securely to prevent unauthorized access. To this end, the Cards API provides encrypted card data and limits the exposure of sensitive information in API responses.
In addition, below is a summary of best practices for you to follow as part of your integration to safeguard your users.
Best Practices
Secure key management
Cryptographic keys are the foundation of your card data security. If keys are compromised, the encryption protecting your cardholder data is rendered useless. Aligning with PCI DSS requirements ensures keys are managed throughout their lifecycle securely.
Safeguarding cardholder data is critical for protecting your users against fraud and maintaining compliance with the Payment Card Industry Data Security Standard (PCI DSS).
Sensitive information, including the Primary Account Number (PAN) and Card Verification Value (CVV), must be strictly controlled to prevent unauthorized access. To support this, our Cards API actively limits the exposure of sensitive information in API responses and ensures card data is fully encrypted.
To further protect your users, we strongly recommend implementing the following security best practices within your integration.
Key storage
Never hardcode cryptographic keys in source code, configuration files, or plaintext repositories. Utilize dedicated hardware, such as a Hardware Security Module (HSM), or a managed cloud Key Management Service (KMS) to store keys securely.
Key access control
Enforce the principle of least privilege and strict separation of duties. Access to cryptographic keys should be restricted to the absolute minimum number of authorized personnel required to perform specific tasks. Mandate Multi-Factor Authentication (MFA) for any system or portal where keys are managed.
Key rotation
Implement automated, scheduled key rotation policies. Cryptographic keys should be rotated at the end of their defined cryptoperiod (e.g., annually) or immediately if a breach or compromise is suspected. Old keys must be retired securely and only retained if needed to decrypt archived data.
Key backup
Maintain secure backups of your cryptographic keys to ensure business continuity in the event of hardware failure. Backups must be strongly encrypted and subject to the same strict access controls and physical security requirements as the active keys.
Secure retrieval and transmission
When handling sensitive cardholder data (such as PANs or CVVs) across your API integrations, you must ensure the data is completely protected both in transit and at rest.
Secure communication
Always transmit sensitive cardholder data over secure, encrypted channels. Ensure your API integrations enforce robust transport-level security using TLS 1.2 or higher. Never transmit unprotected cardholder data over open, unencrypted, or public networks.
Secure storage
Minimize the storage of sensitive data. If you must store the Primary Account Number (PAN), it must be rendered unreadable using strong one-way hashing, truncation, tokenization, or robust cryptography. Never store Sensitive Authentication Data (SAD), such as the CVV/CVC, after the transaction authorization process is complete.
Temporal access
Restrict the duration that sensitive data is accessible. Utilize tokenization to exchange card details for a non-sensitive equivalent. If plaintext data must be retrieved for display (e.g., revealing a virtual card number to a user), ensure it is only available ephemerally (just-in-time) and expires from the user interface and local memory as quickly as possible.
Handling decrypted data
Even if data is transmitted securely, how your application handles decrypted cardholder data in its active memory or backend systems is a common vulnerability point.
Avoid logging sensitive data
Never write unencrypted Primary Account Numbers (PAN) or Sensitive Authentication Data (SAD) to application logs, system logs, error traces, or analytics platforms. If a transaction reference is needed for debugging, only log truncated versions (e.g., first 6 and last 4 digits) or a tokenized reference.
Memory management
Treat sensitive card data as highly volatile. Once the decrypted PAN or CVV has served its immediate purpose (such as being rendered on the screen or passed to a payment gateway), immediately clear it from application variables and memory arrays (zeroing out the memory) to prevent exposure through memory dumps or memory-scraping malware.
Prevent local caching
Ensure your application forms explicitly disable caching and autocomplete (e.g., using autocomplete="off" in HTML) for fields handling sensitive card data. For mobile apps, ensure decrypted card details are not inadvertently captured in background screen snapshots or saved to local device storage.
Limit & authenticate user access
Protecting card data also requires strict control over who can access it and when. This applies to both your end-users viewing their virtual cards and your internal team managing the platform.
Step-up authentication (MFA)
Require strong step-up authentication before revealing sensitive card details to an end-user. If a user requests to view their full virtual card PAN or CVV in your app, challenge them with a biometric prompt (FaceID/TouchID), a PIN, or a One-Time Password (OTP) before rendering the data.
Role-Based Access Control (RBAC)
For your internal staff, strictly enforce RBAC. Customer support agents, developers, and administrators should never have access to full plaintext PANs or CVVs. Dashboards should default to displaying only masked card numbers (e.g., **** **** **** 1234) unless a specific, highly privileged role requires full access for a compliant business reason.
Strict session timeouts
Implement aggressive idle timeouts for any interface that displays unmasked cardholder data. If a user leaves the screen idle, automatically mask the card details or log the user out after a short duration (e.g., 30 to 60 seconds) to prevent shoulder-surfing or unauthorized access on unattended devices.
Related Links
On this page
- Manage card security