---
title: "Tokenize"
method: POST
path: "/v1/aliases/tokenize"
tags: ["/v1/aliases"]
---

# Tokenize

`POST /v1/aliases/tokenize`

Tokenize cards, CVVs and custom fields. It supports single and bulk tokenization for batches of requests.

## Request body

- BulkTokenizeRequest
  - `requests` TokenizeRequest[], required — List of tokenization requests.
    - union — List of tokenization requests.
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `pan` string — The card number.
        - `expiryMonth` string — The expiry month of the card.
        - `expiryYear` string — The expiry year of the card.
        - `cardholder` CardholderData
          - `ipAddress` string — IP address.
          - `phoneNumber` string — Phone number.
          - `emailAddress` string — Email address.
        - `networkTokenOptions` TokenizeNetworkTokenOptions
          - `createNetworkToken` boolean — Create a Network Token.
        - `validUntil` string, date-time — The date and time after which the alias is automatically deleted. Set at creation. Must be in <a href='https://en.wikipedia.org/wiki/ISO_8601' target='_blank'>ISO-8601</a> format (`yyyy-MM-dd'T'HH:mm:ss'Z'`).
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `cvv` string — The CVV number.
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `custom` string — The custom field to be tokenized.
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `token` string — A wallet provider token containing encrypted card details.
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `token` string — A wallet provider token containing encrypted card details.

## Response `200`

Successfully received tokenization request

- BulkTokenizeResponse
  - `overview` ResponseOverview — Overview of results.
    - `total` integer — Total requests.
    - `successful` integer — Successful requests.
    - `failed` integer — Failed requests.
  - `responses` TokenizeResponse[] — List of tokenization responses.
    - union — List of tokenization responses.
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `alias` string — The requested alias.
        - `maskedCC` string — The nonsensitive masked representation of the value behind the alias.
        - `fingerprint` string — An unique identifier of the card number. Useful to identify multiple customers' or the same customer's transactions where the same card was used.
        - `validUntil` string, date-time — Valid until
        - `networkToken` NetworkTokenInfo
          - `status` 'INACTIVE' | 'ACTIVE' | 'SUSPENDED' | 'DELETED' | 'PENDING' | 'FAILED'
          - `tokenCreated` boolean — If a network token was requested then this value informs if it was successfully created or not.
          - `reason` NetworkTokenError
            - `code` 'SERVICE_NOT_ALLOWED' | 'TOKEN_PROVIDER_UNAVAILABLE' | 'MISSING_FIELD' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION' | 'WAITING_ACTIVATION' | 'INTERNAL_ERROR' | 'UNKNOWN_ERROR'
            - `message` string
          - `token` string
          - `expiryMonth` string
          - `expiryYear` string
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `alias` string — The requested CVV alias. CVV aliases have a limited lifespan of 30 minutes and can't be detokenized anymore when expired.
        - `expiryDate` string, date-time — The alias expiration date.
      - object
        - `type` 'CARD' | 'CVV' | 'CUSTOM' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'CERTIFICATE', required
        - `alias` string — The requested alias.

## Other responses

- `400` — Invalid request

---

[API](https://skmtc.dev/pci-proxy/apis/pci-proxy-api-reference-datatrans-endpoints.md) · [All operations](https://skmtc.dev/pci-proxy/apis/pci-proxy-api-reference-datatrans-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pci-proxy/pci-proxy-api-reference-datatrans-endpoints/revisions/1f4f905fd175/schema)
