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

# addToken

`POST /v1/Payment/addToken/json`

## Request

- Base URL: `https://payment.pay.nl`
- URL: `https://payment.pay.nl/v1/Payment/addToken/json`
- Auth: HTTP basic

## Request body

- AddToken
  - `payment` PaymentAddToken, required: Afhankelijk van de keuze voor CSE of CARD, kies hier de bijbehorende data
    - `method` 'cse' | 'card', 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` CardNoCVC
      - `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).
      - `name` string, required: The name of the customer as printed on his/her card
    - `auth` object
      - `dsTransactionId` string: If a 3DS authentication is available for the card, the 3DS transaction ID can be stored with the token.
  - `options` OptionsAddToken
    - `schemeTransactionId` string
    - `label` string: By submitting a label for the token the consumer can distinguish the tokens if he has multiple cards
  - `customer` CustomerAddToken
    - `reference` string: The reference for the customer, eg. a customer ID or account identification number.

## Response `200`

Successful operation

- AddTokenResponse
  - `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.
  - `token` object
    - `id` string
    - `hash` string

## Other responses

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

---

[API](https://skmtc.dev/pay/apis/pay-card-payment-api-v1-2-3.md) - [All operations](https://skmtc.dev/pay/apis/pay-card-payment-api-v1-2-3/llms.txt) - [OpenAPI document](https://skmtc.dev/pay/apis/pay-card-payment-api-v1-2-3/revisions/07c50a8d28b1?raw)
