---
title: "getCardToken"
method: POST
path: "/v1/Payment/getCardToken/json"
tags: ["Card Payments"]
---

# getCardToken

`POST /v1/Payment/getCardToken/json`

API returns a token that is generated for the provided card data. The token can be used to
complete the next steps in the payment process.

## Request body

- CardToken
  - `serviceId` Id, required — unresolved $ref
  - `requestToken` string, required — Generated token used to authenticate the requester
  - `merchantReference` string — Reference of the merchant, returned in the request response
  - `payment` PaymentAuthenticate, required — Afhankelijk van de keuze voor CSE of CARD, kies hier de bijbehorende data
    - `method` 'cse' | 'card' | 'token', required — Defines the method in which the card details are submitted. Choose CSE when submitting the details in `cse` format, `card` when submitting plain card data. Note: the corresponding array must be included in the request.
    - `cse` Cse
      - `data` string, required — The encrypted card details, base64 encoded. See the `card` option for the fields that should be part of the encrypted card data.
      - `identifier` string, required — ID of the public key that is used to encrypt the card details.
    - `card` Card
      - `number` string, required — The customer's card number
      - `expire_month` string, required — Expire month of the card in MM format (2 digits).
      - `expire_year` string, required — Year the card expires in YY format (2 digits).
      - `cvc` string — Card verification code / safekey code of the card used
      - `name` string, required — The name of the customer as printed on his/her card
    - `token` Token
      - `id` string, required
    - `browser` Browser
      - `javaEnabled` 'true' | 'false', required — Indicator that represents the ability of the cardholder browser to execute Java.
      - `javascriptEnabled` 'true' | 'false', required — Indicator that represents the ability of the cardholder browser to execute Javascript.
      - `language` string, required — Value representing the browser language as defined in IETF BCP47.
      - `colorDepth` 1 | 4 | 8 | 15 | 16 | 24 | 32 | 48, required — Value representing the bit depth of the colour palette for displaying images, in bits per pixel. Possible values: `1` = 1 bit, `4` = 4 bits, `8` = 8 bits, `15` = 15 bits, `16` = 16 bits, `24` = 24 bits, `32` = 32 bits, `48` = 48 bits
      - `screenHeight` number, required — Total height of the Cardholder’s screen in pixels.
      - `screenWidth` number, required — Total width of the cardholder’s screen in pixels.
      - `tz` number, required — Time difference between UTC time and the Cardholder browser local time, in minutes.
    - `auth` object
      - `payTdsTransactionId` string — The identifier of the 3DS2 authentication session
      - `acquirerID` string — The identifier of the 3DS2 authentication session

## Response `200`

Successful operation

- CardTokenResponse
  - `request` RequestResponse
    - `result` integer — Indicates whether the request was successfully processed (`1`) or some error has occurred (`0`).
    - `errorId` string — If the request was not successfully processed this parameter holds the ID of the error that has occurred.
    - `errorTag` string — The error tag can be used to generate an error response for the customer.
    - `errorMessage` string — Description of the error that occurred. This message is returned in the language (if available) in which the transaction is/was submitted.
  - `binInfo` object
    - `anonymous` string
    - `bankId` number
    - `brandCode` string
    - `brandName` string
    - `brandProduct` string
    - `cardType` string
    - `countryCode` string
    - `fundType` 'debit' | 'credit'
    - `scheme` string
    - `brands` string[] — A list of brand names that are available on the card.

## Other responses

- `400` — Bad request. See response for details.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Not found.

---

[API](https://skmtc.dev/pay/apis/pay-transaction-gateway-unit-api.md) · [All operations](https://skmtc.dev/pay/apis/pay-transaction-gateway-unit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pay/pay-transaction-gateway-unit-api/revisions/2bc260c7bdfc/schema)
