Skip to main content

Token

Object

NameTypeMandatoryDescription
classstringYThe type of object which is being returned. In this case it will be token.
idintYThe SysPay reference of the returned token.
statusstringYThe token status. See statuses.
action_urlstringYThe url where the customer should be redirected to in order to complete the operation or null if no redirection is requested.
extrastringNThe extra parameter which was passed to the request.
booking_detailsobjectYThe booking details. See *Booking Details * object or null if no details are linked to it.
creation_dateunix timestampYThe creation date of the token.
expiration_dateunix timestampYThe expiration date of the token or null if no expiration date is set.
accept_untilunix timestampNA unix timestamp which determines the date and time the customer is allowed to complete the operation.
customerobjectYThe customer details. See Customer object.
payment_methodobjectYThe payment method details. See Payment_method object. This will be null until the customer fills in his payment method details.
moto_instance_idintYThe moto_instance reference or null if the token was not created via a MOTO request.
mandateobjectYThe mandate details. See Mandate object.
paymentobjectYThe payment details. See Payment object or null if no initial payment has been requested together with the token creation.
riskobjectNThe risk of the token. See Risk object. Will only be returned if a verification has been applied.

Token statuses

StatusFinalDescription
ACTIVENThe token is active and can be detokenized.
REDIRECTNThe token has not been created yet. We are still waiting for the customer to visit the provided redirect_url and enter the required details.
CANCELLEDYThe token has been canceled and cannot be detokenized anymore.
EXPIREDYThe token is expired and cannot be detokenized anymore.
NOT_DETOKENIZABLEYThe token is not detokenizable due to the payment method not supporting detokenization.
TIMED_OUTYThe token has been canceled because no details were provided before the accept_until parameter date.

Example

{
"class":"token",
"id":7,
"status":"ACTIVE",
"action_url":null,
"booking_id":"test-ref",
"check_in_date":"2015-08-22",
"check_out_date":"2015-08-24",
"expiration_date":1421426671,
"customer":{
"class":"customer",
"email":"test@domain.com",
"language":"en"
},
"payment_method":{
"class":"payment_method",
"type":"CREDITCARD",
"display":"4111-11xx-xxxx-1111",
"validation_status": "VALID",
"validation_date":"1443607554",
"invalid_reason": null,
"details":{
"class":"payment_method_details",
"holder":"Card Holder Name",
"scheme": "VISA",
"exp_month":"01",
"exp_year":"2016"
}
}
}