Skip to content

Tokenization

Method for tokenizing a card PAN without passing the expiration date.

URL

Method: POST

  • Production: https://api.pay.kvell.group/v1/customers/{customer_key}/cards
  • Stage: https://api.pay.stage.kvell.group/v1/customers/{customer_key}/cards

Request parameters

Name Data type Required Description
customer_key string Yes Customer identifier in the merchant's system

Request body parameters

Name Data type Required Description
pan string Yes 16-digit card number

Request example

{
  "pan": "string"
}

Request headers

Name Data type Required Description
X-Api-Key string Yes Unique shop identifier
X-Signature string Yes Signature

The X-Signature signature is built by concatenating X-Api-Key, customer_key, pan, and secret_key. sha256 is computed from the resulting string:

sha256({x-api-key}{customer_key}{pan}{secret_key})

where secret_key is the secret key found in the merchant's shop settings;

Response

Response example

{
  "customer_id": 0,
  "pan_mask": "string",
  "token": "string",
  "created_at": "2022-07-07T17:55:21.759Z"
}
{
  "errors": [
    {
      "message": "string",
      "code": 0
    }
  ]
}