---
title: "Pan To Token V2"
method: POST
path: "/sc/v2/sc_pan_to_token/"
tags: ["Card PaySecure WS V2"]
---

# Pan To Token V2

`POST /sc/v2/sc_pan_to_token/`

<ul>
<li class="docBullet">This web service allows to get token for the provided PAN.</li>
<li class="docBullet">Pass the AES encrypted PAN,EXPIRY and CVV2 to the API.</li>
<li class="docBullet">Expiry must be in YYMM format before encryption.</li></ul>

## Headers

- `Session-Id` string, required
- `x-api-key` string

## Request body

- PsPanToToken
  - `client_id` integer, required — Unique identifier for the client which Paymentology will provide at outset
  - `expiry` string, required — AES Encrypted Expiry
  - `iv` string, required — 16 bits initialization vector (IV) used while encryption
  - `pan` string, required — AES Encrypted PAN
  - `cvv2` string — AES Encrypted Cvv2

## Response `200`

Successful Response

- PaySecurePanToTokenResponse
  - `header` PaySecurePanToTokenResponseHeader
    - `error_id` integer — error id
    - `error_desc` string — error message
  - `body` PaySecurePanToTokenResponseBody
    - `token` integer — public token back

## Other responses

- `404` — Webservices does not exist
- `500` — Internal Server error

---

[API](https://skmtc.net/paymentology/apis/payapi-docs.md) · [All operations](https://skmtc.net/paymentology/apis/payapi-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paymentology/payapi-docs/revisions/a675891b0365/schema)
