Skip to main content

Detokenize a token request

This method allows you to detokenize a token that was created by a merchant.

Note: Detokenization stands for accessing a SysPay hosted interface allowing you to see token (including if applicable the raw payment method details).

The response includes a one-time-use redirect URL, to which the user has to be redirected to in order to view the payment method details. The generated URL can only be accessed once and it has a timed access limit of 60 seconds after it has been requested. (If it’s expired, you should request another one). As this URL will let you access sensitive details, it is important to consider it as such, it should not be stored and it should only be communicated through a secure channel.

  • URL syntax: /api/v2/merchant/token/{token_id}/detokenize
  • Method: POST

URL parameter

NameTypeMandatoryDescription
token_idintYThe reference id of the token to be retrieved.

Request parameters

NameTypeDetailsMandatoryDescription
typestringTEXT | IMAGEYThe returned detokenization type. IMAGE refers to the payment method details returned as an image. TEXT is the payment method details shown as pure text. Please check which types you are allowed to use.
viewerstringMax length 100YDetails of the user that will be viewing the detokenized data : A reference which stands for a unique person.

Example request

/api/v2/merchant/token/83392/detokenize
{
"type": "IMAGE",
"viewer": "John Doe"
}

Response parameters

The response in this case is a Detokenize object.

Example response

{
"class":"detokenize",
"redirect_url":"http:\/\/www.syspay.com\/redirect\/detokenize\/a448bc2a-9d97-11e4-a460-1ed32635ba79"
}