This section describes security and data usage and retention policies for Visa Click to Pay integration.
The following sections define Visa-recommended approaches to secure communications between Digital Terminals and the Visa Click to Pay system.
All clients must have a Visa Developer Portal account. Once registered, the requestor will receive access credentials, which allows the use of Visa Digital Commerce Program APIs. These credentials consist of an API key and a shared secret, which must never be shared beyond trusted individuals and services.
Visa Developer Portal credentials include:
Note: Authentication credentials are different for the testing and production environments.
All Digital Terminals must authenticate with Visa using the following methods:
Note: Only x-pay-token (using shared secret) or mutual TLS can be used as authentication options for backend-to-backend interactions for clients.
All messages to Visa must be sent through an approved transport channel with the required authentication and authorization scheme for the type and format of the information which is passed.
All DPA must use SSL/TLS for exchanging messages with Visa. Not all TLS versions are currently supported. The approved version of TLS is 1.2 or higher.
The approved symmetric encryption algorithm is Advanced Encryption Standard (AES). AES usage must have a minimum key size of 256 bits. AES based encryption must be done using one of the following modes:
The approved Asymmetric Encryption algorithms are:
The approved hashing algorithms are:
Cross-Origin Resource Sharing (CORS) uses additional HTTP headers to enable a web application from one origin (domain, protocol, and port) to access selected resources from a server in a different origin. A web application executes a cross-origin HTTP request for a resource from a different origin than its own. iFrame should not use document.domain and CORS in Ajax should be disabled.
The following guidelines can be used as a starting point when designing a solution to secure the DPA front end for Click to Pay checkout.
Sanitization helps to defend against XSS attacks in the front-end JS code. Before inserting any external data into the DOM (when data is passed between DPA FE and the Click to Pay SDK), the DPA should convert any characters contained therein that could be used to transform an innocent string into an offending piece of HTML/JavaScript code:
Visa recommends that a DPA use iFrames for loading the front-end code for DPA FE, Click to Pay system FE, and DCF FE. (Pop-up is an additional method for displaying the front-end component, depending on browser support). Reasons include:
Web pages that are rendered in iFrames or pop-ups, such as the Click to Pay system FE, are vulnerable to clickjacking attacks. DPA can use an X-Frame-Options header wherever the ALLOW-FROM option is supported (e.g., Firefox, IE). In this case, use sandbox attributes for iFrames and only allow selective capabilities.
A DPA cannot use X-Frame-Options for browsers that do not support ALLOW-FROM (e.g., Chrome, Safari). Therefore, for all actions that modify the data, the best mitigation against clickjacking for unsupported browsers is to always display confirmation for all actions in a way that cannot be impersonated via clickjacking.
X-Frame-Options:
Frame Busting is a term for JavaScript code used to combat XFS attacks. Integration of this solution prevents the use of websites as malicious iFrame traps.
The most common Frame Busting code is made up of two basic elements: a conditional statement and a counter action. For more details, see: https://www.checkmarx.com/knowledge/knowledgebase/XFS.
Example: if (top != self) {top.location = self.location;}.
The postMessage specification recommends the following steps to ensure the safety of the process when using cross-document messaging:
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event) {
if (event.origin !== "merchant domain")
return;
//
}
Example step 4: targetWindow.postMessage(message, merchant domain);
targetWindow.postMessage(message, merchant domain);
Once a supported browser receives this header, the browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. This also prevents HTTPS click-through prompts on browsers.
Example: “Strict-Transport-Security: max-age=31536000; includeSubDomains”.
HTTP API response must include following headers with appropriate values:
Always enforce Strict-Transport-Security using CSP. A primary goal of CSP is to mitigate and report XSS attacks. In addition to restricting the domains from which content can be loaded, the server can specify which protocols are allowed to be used; for example (and ideally, from a security standpoint), a server can specify that all content must be loaded using HTTPS.
Configure the web server to return the Content-Security-Policy HTTP header. The policy must include:
For Chrome[1] browsers, use the “require-sri-for” CSP directive to require that the browser integrity-check every resource of a given type. If a resource of that type is loaded without integrity metadata, it will be rejected without triggering a network request. This enables the browser to verify the files it fetches.
Note: This may be a problem when files are modified on the fly, such as for Dynamic JavaScript minification or obfuscation.
[1] Not supported in Safari or IE.
<script src="https://example.com/example-framework.js" integrity="sha384oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC” crossorigin="anonymous"></script>.
The following masking rules are followed when applicable in an API:
Cryptographic material includes, but is not limited to, the keys below
Key Material |
ext_context |
use |
key_ops |
kty |
---|---|---|---|---|
Payload signature verification public key [Message Signature Verification Key - as onboarded in MCS - used by ARM as "PoP" token] |
payload |
sig |
verify |
RSA |
Payload encryption shared secret (symmetric key) [Full Payload Encryption Key] |
payload |
enc |
decrypt |
oct |
Payload API request (Backend-Backend) authentication key (symmetric/shared_secret or asymmetric/ public key) [Payload Outbound Authentication Signature Key] |
authentication |
sig |
sign |
oct |
“Personal Information” or “PI” data means any information relating to an identified or identifiable natural person (“Data Subject”), or any information that is combined with such individually identifiable information, including information that can be used to authenticate that individual or access an account. This definition also includes, but is not limited to, “Cardholder Information”.
“Cardholder Information” means (i) with respect to a payment card, the account holder’s name, Primary Account Number (“PAN”) or any other number that is mapped to or a surrogate for a PAN, service code, card validation code/value, PIN or PIN block, valid to and from dates and magnetic stripe data; (ii) any information sufficient to enable an alternate form factor to use an underlying payment card account to initiate a payment or other transaction; (iii) any information relating to a payment card transaction that is identifiable with a specific account.
“Visa Data” means any information owned and provided by Visa, in any form, format or media (including paper, electronic and other records) that the Company has access to, obtains, uses, maintains, or otherwise handles in connection with the Program. Visa Data may include Visa PI and Cardholder Information.
Click to Pay System shares data with other Click to Pay participants only as reasonably needed to provide the Click to Pay services. DPA as well as all other players in VDCP, are responsible for handling and protecting Visa Data per requirements. Data handling requirements for high-level data elements are described in table below.
Name |
Data Classification |
Comments |
Requirements |
---|---|---|---|
Consumer Name |
PI Data |
Collected by DPA and shared with Click to Pay to facilitate enrollment and checkout operations. |
Encrypted and shared with Click to Pay. DPA must not store this. |
PAN |
PI Data |
Collected by DPA and shared with Click to Pay to facilitate enrollment and checkout operations. |
Encrypted and shared with Click to Pay. Data to be used by Click to Pay to facilitate enrollment and checkout functions. DPA must not store this. |
Card Security Code |
PI Data |
Collected by DPA and shared with Click to Pay to facilitate enrollment and checkout operations. |
Encrypted and shared with Click to Pay. Data to be used by Click to Pay to facilitate enrollment and checkout functions. DPA must not store this. |
Expiry Date |
PI Data |
Collected by DPA and shared with Click to Pay to facilitate enrollment and checkout operations. |
Encrypted and shared with Click to Pay. Data to be used by Click to Pay to facilitate enrollment and checkout functions. DPA must not store this. |
Billing Address |
PI Data |
Collected by DPA and shared in the payment payload. |
Encrypted and shared with DPA by Click to Pay. DPA to ensure that data usage is limited to facilitate the consumer’s checkout operations only (just for that transaction). DPA must not store this. |
Consumer Assurance |
Visa Data |
Click to Pay system provided assurance after successfully validating the identity of the consumer. Click to Pay system should include sufficient information about the consumer identity within this assurance so that other Click to Pay systems can fetch customer profile using this assurance if the consumer identity exists with them. |
Click to Pay systems should protect the consumer identity or associated identity used to validate the consumer within the assurance using encryption or data not being sent in the clear. DPA should not store consumer assurance data after completion of a checkout. |
Cookie |
PI Data Visa Data |
Information stored within the browser which allows the Click to Pay to recognize the consumer or device during repeat purchases. Click to Pay will store the minimum information like references to recognize a returning consumer. |
Cookie information is created and managed by Click to Pay. DPA must not have access to this information. |
Masked Cards |
PI Data |
List of cards associated to the consumer identity. Cardholder-facing information about their card so that they can recognize the payment instrument used in this transaction. DPA UX displays the card list. The data elements involved are:
|
DPA may only use this information to present a card list to the consumer for selection to facilitate a Click to Pay checkout. DPA must not store this. |
Email Address |
PI Data |
Email address is collected by the DPA UX. |
DPA pass the email address to Click to Pay for purpose of the transaction. DPA must collect user consent to share this information with Click to Pay. DPA must not store this. |
Phone Number |
PI Data |
Mobile Number is collected by the DPA UX |
DPA must not store phone numbers and must pass this to Click to Pay for purpose of the transaction. DPA must collect user consent to share this information with Click to Pay. DPA must not store consumer’s phone numbers. |
Payload |
Visa Data (Includes PI Data). |
Provided by Click to Pay to:
|
DPA must not store the payload obtained during a Click to Pay checkout from Click to Pay. DPA is expected to securely transmit the payload to processor for processing |
Transaction Reference |
Visa Data |
Transaction reference is a unique identifier generated by Click to Pay and is bound to a DPA. Transaction reference can be used to request a payment payload by:
|
Each time a payload is requested, Click to Pay System may generate new Payment Data. Transaction Reference may be stored by a DPA for accessing Click to Pay Payload for repeat purchases with consumer consent. |