---
title: Card Tokenization
description: "Merchants worldwide are exploring the realm of tokens and tokenization. When implemented appropriately, tokenization for merchants has a dual purpose: - Utilized to safeguard sensitive card data. - Acts as a facilitator for seamless integration across e-Commerce and in-store platforms.…"
url: "https://docs.logibiztech.com/docs/card-tokenization/"
updated: "2024-02-06"
category: Tutorials
---

# Card Tokenization

Merchants worldwide are exploring the realm of tokens and tokenization. When implemented appropriately, tokenization for merchants has a dual purpose:

- Utilized to safeguard sensitive card data.
- Acts as a facilitator for seamless integration across e-Commerce and in-store platforms.

## Types of Tokenization

Paybiz facilitates card tokenization with the following precise key requirements for Customer Card Tokenization:

### 1. New Customer Card

| **Functionality** | **Purpose** |
| --- | --- |
| Support the option to save a payment card during new customer registration. | Ensures a seamless on-boarding experience, enabling new customers to make immediate payments with their chosen card. |

### 2. Card Saving

| **Ability** | **Purpose** |
| --- | --- |
| Customers can save multiple payment cards against their customer ID. | Enables existing customers to associate multiple cards with their profile for efficient and swift transactions. |

### 3. Card Update

| **Capability** | **Importance** |
| --- | --- |
| Customers can update their saved card information. | Vital for maintaining accurate payment details, ensuring up-to-date and valid cards on their profile. |

### 4. Card Listing

| **Feature** | **Benefits** |
| --- | --- |
| System provides the ability to list all payment cards associated with a specific customer ID. | Allows customers to view and manage all saved cards in one place, simplifying card management and providing an overview of available payment options. |

### 5. Card Deletion

| **Option** | **Advantages** |
| --- | --- |
| Customers have the ability to delete any saved payment cards. | Enhances control, allowing customers to remove outdated or unnecessary cards from their profile as needed. |

### Code example

 Copy CodeCopiedUse a different Browser

```clike
private String request() throws IOException {
	URL url = new URL("https://staging.logibiztech.com:8777/maps/external/maps/customer_card/card_tokenization");
	HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
	conn.setRequestMethod("POST");
        conn.setRequestProperty("Authorization",
    "Bearer OGE4Mjk0MTc0YjdlY2IyODAxNGI5Njk5MjIwMDE1Y2N8c3k2S0pzVDg=");
	conn.setDoInput(true);
	conn.setDoOutput(true);
	String data = "tranPortalId": "t1",
    "password": "P@ssword@123",
    "actionFlag": "N",
    "custId": "",
    "cardToken": "",
    "cardNumber": "5555555555554444",
    "expiryMonth": "10",
    "expiryYear": "2023",
    "cardHolderName": "final2",
    "emailAddress": "abcd@gmail.com",
    "mobileNumber": "00102234455542"";
	DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
	wr.writeBytes(data);
	wr.flush();
	wr.close();
	int responseCode = conn.getResponseCode();
	InputStream is;
	if (responseCode >= 400) is = conn.getErrorStream();
	else is = conn.getInputStream();
	return IOUtils.toString(is);
}
```

### Response

#### Success scenario

 Copy CodeCopiedUse a different Browser

```typescript
{
    "response": {
        "cardToken": "555555******4444",
        "cardholderName": "Test user",
        "custMobNum": "00102234455542",
        "custEmail": "testUser@gmail.com",
        "custId": "c1b2ee77-0367-49e0-894d-614bd3ee7e04"
    }
}
```

#### Failure scenario

 Copy CodeCopiedUse a different Browser

```javascript
{
    "errorCode": "LOG-600",
    "errorDesc": "tranPortalId can't be blank"
}
```
