Tokenisation guide

Learn the benefits of Tokenisation, how it can support customer loyalty, and how to develop a tokenisation-based payments workflow

What is tokenisation?

Tokenisation lets returning customers pay without re-entering their card details. This guide explains how N-Genius Online supports tokenisation and how to build a tokenisation-enabled payment workflow.

Quick repeat payment journeys help build customer loyalty. Traditionally, customers who returned to an online shop had to enter their payment information each time. This inconvenience often led the customer to consider alternative suppliers.

Most payment gateways let online businesses capture and store card information to offer a one-click service. However, the Payment Card Industry Data Security Standard (PCI DSS) and good security practice make this difficult. Well-known card data breaches have also left most online merchants without a secure way to offer one-click payments.

Tokenisation solves this problem. It assigns a non-sensitive alias (the token) to a customer's payment card information, and you use this token for repeat payments. You can store tokens without significant PCI DSS or security implications. The payment gateway accepts a token as if it were the card information itself, so tokenisation supports both good security and loyalty-building payment journeys.

Does N-Genius Online support tokenisation?

Yes. N-Genius Online uses a vault-less tokenisation model. When the same merchant receives the same card information, it generates the same token value.

For example, Shop X receives a payment from a card ending 1234. The next time the customer uses this card at Shop X, the token value is the same (1234). If the customer uses the same card at Shop Y (a different merchant), the token value is different (for example, 5678).

❗️

Do not change your Token Group value

In the N-Genius Online portal, go to Settings > Organizational Hierarchy to find the Token Group value. N-Genius uses this value as a secure key, so your tokens always differ from those of other merchants. Other merchants cannot use your tokens by mistake.

Do not change this value unless a Network International representative instructs you to. Changing it invalidates all tokens generated with the original key.

If you need to change this value, record the previous value first so you can restore it if problems occur. One reason to change it is to share your tokens deliberately with another N-Genius account.

Unlike vaulted tokenisation models, the vault-less model gives your business more flexibility in how you use tokens. If you have multiple shops or merchants, you can configure N-Genius so that all of them use the same tokens.

Check whether tokenisation is enabled

Tokenisation is already enabled on some N-Genius Online accounts. To confirm, contact your Network International Relationship Manager or the Customer Services team.

Build a tokenisation-enabled payment workflow

A tokenisation-enabled payment workflow with N-Genius has two steps:

  1. Receive token information.
  2. Use tokens for payment.

Step 1: Receive token information

To start, integrate with one of the N-Genius integration methods:

Whichever integration method you choose, a script or page on your server interacts with the N-Genius APIs on your customer's behalf:

  • With an HPP integration, this script controls order creation, retrieval of the order outcome, or both.
  • With a Hosted Session / WebSDK or Mobile SDK integration, this script submits the SessionId value to complete the payment.
  • With a Direct API integration, one or more scripts interact with N-Genius in all payment interactions.

If tokenisation is enabled, the _embedded.payment[X] block of payment outcome responses from the N-Genius APIs contains the following JSON data:

{
  "savedCard": {
    "cardToken": "CARD_TOKEN",
    "cardholderName": "Test Customer",
    "expiry": "2025-04",
    "maskedPan": "401200******1112",
    "scheme": "VISA"
  }
}

CARD_TOKEN is the Base64-encoded token for the payment card.

The X value in _embedded.payment[X] is the index of the payment, for orders with multiple payments. In most cases, X is 0 (zero).

KeyTypeDescription
cardTokenBase64-encoded stringThe unique token for the payment card
cardholderNamestringThe cardholder's name as presented at payment
expiryYYYY-MMThe card expiry date
maskedPanstringA masked version of the card's primary account number (PAN)
schemestringThe card scheme of the payment card
🚧

If savedCard data is missing

If your payment outcome response does not contain savedCard data, either tokenisation is not enabled on your N-Genius Online account or the payment was not successful.

N-Genius does not return tokens for unsuccessful payments.

After you receive tokens, choose an appropriate way to store the data. Although you do not use every element of the savedCard block in all cases, we recommend that you save all of them.

Common ways to store this data include:

  • A dedicated table in your database with all fields in the savedCard block and a reference to the customer it belongs to (recommended)
  • An additional field in your customer database table, containing a Base64-encoded form of the full savedCard block

The next section describes how to use this stored data to trigger new payments. Your customers do not need to enter their full card information each time.

Step 2: Use tokens for payment

You can present the savedCard token information to N-Genius Online for a new payment in two ways. In both cases, show the customer the card information you have on file before you proceed to payment.

Use the maskedPan, expiry and scheme values from your stored savedCard data. For example:

Pay with card 401200******1112 | VISA | Expiry: 2022-01

The customer now knows which card they are paying with. They can change it before you attempt the payment.

Next, capture the customer's card security code (CSC), also called the card verification value (CVV). How you capture the CSC determines how you present the savedCard information for the new payment. Choose one of these options:

  • Option A: Capture the CSC on your page and submit the payment data through the Direct API.
  • Option B: Use the N-Genius Hosted Payment Page (HPP) to capture the CSC.

Option A gives the customer a quicker checkout and needs less integration work. For security and PCI DSS reasons, your site must not store the CSC. Use it only in transit to build the API request.

Option B provides better built-in security and PCI DSS compliance. However, it interrupts the customer's payment experience with a visit to the N-Genius Online payment page. On this page, the customer can choose a different payment card, so the token returned at the end of the process can differ.

Option A: Make a new payment through the Direct API

In this model, your site captures the CSC temporarily, immediately before the payment attempt.

To make a tokenised payment through the Direct API:

  1. Obtain an access token. For details, see Request an access token.
  2. Create an order for the new payment. For details, see Two stage payments.
  3. Locate the savedCard URI in the order creation response. It is the payment:saved-card.href value in the _embedded.payment[X]._links block.
  4. Build a PUT request to this URI with the relevant savedCard data as the payload. The request format is described in Saved card request.
  5. Submit the request.
  6. Complete the 3-D Secure challenge, if required.
  7. Interpret the result of the payment.

For steps 5–7, go to Two stage payments and follow the guidance from the Submit payment card information step.

Saved card request

The request uses the following method and resource:

  • HTTP method: PUT
  • Resource (URI): the value of _embedded.payment[X]._links.payment:saved-card.href

Headers:

KeyValue
AuthorizationBearer ACCESS_TOKEN
Content-Typeapplication/vnd.ni-payment.v2+json

Body:

KeyValue (example)
cardTokenCARD_TOKEN
expiry2021-12
cvv123
cardholderNameTest Name

Example request body:

{
  "cardToken": "CARD_TOKEN",
  "expiry": "2021-12",
  "cvv": "123",
  "cardholderName": "Test Name"
}

Replace ACCESS_TOKEN with the access token from step 1. Replace CARD_TOKEN with the cardToken value you stored for the customer.

📘

Required savedCard values

In this model, only cardToken, expiry, cvv and cardholderName are required. Other fields, such as scheme and maskedPan, are relevant only when you display card details to the customer.


Did this page help you?
© Network International LLC. All Rights Reserved.