# Secure Card Capture Key

Verifone provides multiple options to integrate to the eCommerce services: Checkout as a Hosted Payments Page (HPP), Checkout as an iFrame, and your own payment forms to capture card data.

For all solutions, both Verifone and you (as a merchant) need to send the card or other sensitive data in a secure way. To encrypt card details or other sensitive data, Verifone gives you the possibility to generate a private-public key pair, called **Secure Card Capture Key**.

## Availability <a href="#availability" id="availability"></a>

Available to all merchants integrating with Verifone's eCommerce services.

**Mandatory on accounts that are using the v2 card capture** **method** and flow as the API cannot be used without a Secure Card Capture Key.

## Secure Card Capture Key <a href="#secure-card-capture-key" id="secure-card-capture-key"></a>

A Secure Card Capture Key consists of:

* a public key, accessible to you to use for encryption
* a private key, only accessible to Verifone, to use for decryption
* a public key alias, to allow Verifone to match the Secure Card Capture Key to be used for decryption when a Transaction is processed.

At least one Secure Card Capture Key needs to be generated for the Organization for which encrypted card details will be needed (typically, this means the Organization with which card payments will be done).&#x20;

**To start accepting eCommerce card payments, you must create a public key for Secure Card Capture**. The public key for Secure Card Capture ensures any card details are encrypted in the browser, so that information can be safely passed from you (merchant) to Verifone.&#x20;

{% hint style="warning" %}
The public key for the Secure Card Capture can be created only by a merchant with an Admin role, or by a Verifone Admin on behalf of the merchant.
{% endhint %}

## Cardholder encryption card API parameters <a href="#cardholder-encryption-card-api-parameters" id="cardholder-encryption-card-api-parameters"></a>

The cardholder data encrypted using the Verifone provided public key. This needs to be provided in base64 encoded format.

The data to encrypt is a JSON with possible tags being `cardNumber`, `sequenceNumber`, `cardholderName`, `startMonth`, `startYear`, `expiryMonth`, `expiryYear`, `cvv`. This should be a single JSON line and should not contain any spaces.

Additionally, a tag called `captureTime` must be presenting indicating the time the card was captured in UTC in format RFC 3339, section 5.6. **e.g.**, 2019-08-24T14:15:22Z. Encrypted card is valid for only 15 minutes.

<table><thead><tr><th width="174">Parameter name</th><th width="136">Required/Optional</th><th>Description</th></tr></thead><tbody><tr><td><code>cardNumber</code></td><td>Required</td><td>Primary account number (PAN), the card identifier found on payment cards. Numeric value with no spaces or separators allowed between the digits.</td></tr><tr><td><code>sequenceNumber</code></td><td>Optional</td><td>The sequence number is the field which can uniquely identify a card. When two or more cards have the same card number, this field helps to make the distinction between the cards. </td></tr><tr><td><code>expiryMonth</code></td><td>Required</td><td>Numeric value with length 2. <strong>e.g.</strong>, March -> 03 </td></tr><tr><td><code>expiryYear</code></td><td>Required</td><td>Numeric value with length 4, <strong>e.g.</strong>, 2028 -> 2028</td></tr><tr><td><code>cvv</code></td><td>Optional</td><td>Numeric value with length 3 or 4</td></tr><tr><td><code>cardholderName</code></td><td>Optional</td><td>&#x3C;= 30 characters, the card holder name as it appears on the card</td></tr><tr><td><code>startMonth</code></td><td>Optional</td><td>Numeric value representing the month when the card was issued </td></tr><tr><td><code>startYear</code></td><td>Optional</td><td>Numeric value representing the year when card was issued</td></tr><tr><td><code>captureTime</code></td><td>-</td><td>The time the card was captured in UTC in format RFC 3339, section 5.6. <strong>e.g.</strong>, 2019-08-24T14:15:22Z.</td></tr></tbody></table>

## Generate a Secure Card Capture Key <a href="#generate-a-secure-card-capture-key" id="generate-a-secure-card-capture-key"></a>

You can generate a Secure Card Capture Key if you have a Merchant Admin role, either via Verifone Central or via API.&#x20;

### Generate a Secure Card Capture Key via Verifone Central <a href="#generate-a-secure-card-capture-key-via-verifone-central" id="generate-a-secure-card-capture-key-via-verifone-central"></a>

Follow these steps to generate a Secure Card Capture Key via Verifone Central.

1. Log in to your Verifone Central account.
2. Navigate to **Administration** > **Organizations**, and select the required organization.
3. Scroll down to the bottom of the page to see the *Secure Card Capture* area.
4. Click on the **Create new public key** button.&#x20;

<div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/2_24.JPG" alt="" height="413" width="555"></div>

### Generate a Secure Card Capture Key via API <a href="#generate-a-secure-card-capture-key-via-api" id="generate-a-secure-card-capture-key-via-api"></a>

Follow these steps to generate a Secure Card Capture Key via API.

1. Authenticate as a Merchant Admin user and make sure this role is linked to the organization for which you want to generate a Secure Card Capture Key.
2. Send the [Generate Key Pair POST call](/api-reference/open-api-references/ecommerce.md).

There is no limit on how many Secure Card Capture Keys an organization can have.

## The public key and public key alias <a href="#the-public-key-and-public-key-alias" id="the-public-key-and-public-key-alias"></a>

The public key and the public key alias of a Secure Card Capture can be viewed anytime either via Verifone Central or via API.

### View a public key via Verifone Central

Follow these steps to view a public key for Secure Card Capture via Verifone Central.

1. Navigate to **Administration** > **Organizations***.*
2. Select the organization for which to view the Secure Card Capture Key(s).
3. Scroll down to the bottom of the page to see the *Secure Card Capture* section where all the available Secure Card Capture Key(s) are displayed.

### View a public key via API

1. Authenticate as a Merchant Admin user and make sure this role is linked to the organization for which you want to view the Secure Card Capture Key(s).
2. Send the [List Key Pair GET call](/api-reference/open-api-references/ecommerce.md).
3. Send the [Deactivate Key Pair call](/api-reference/open-api-references/ecommerce.md) to deactivate the linked Secure Card Capture Key(s).

Any commercially available encryption tools can be used to encrypt card details with the Verifone Secure Card Capture Key. Verifone uses openpgpjs [NPMJS's JS Library](https://www.npmjs.com/package/openpgp) on client for the cryptography of the encrypted Card data to be encrypted by the merchant prior to connecting to Verifone's GSC. The actual cryptography itself is Elliptic Key Cryptography, achieving the same level of security as OAEP, but with much smaller key sizes and hence requiring less computing power.

Once this is done, you can start performing integration tests. By using the [API Keys](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication.md) you created, you can authenticate with our Checkout API or eCommerce API.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verifone.com/online-payments/api-integration-methods-auth-and-endpoints/secure-card-capture-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
