Token
Object
| Name | Type | Mandatory | Description |
|---|---|---|---|
| class | string | Y | The type of object which is being returned. In this case it will be token. |
| id | int | Y | The SysPay reference of the returned token. |
| status | string | Y | The token status. See statuses. |
| action_url | string | Y | The url where the customer should be redirected to in order to complete the operation or null if no redirection is requested. |
| extra | string | N | The extra parameter which was passed to the request. |
| booking_details | object | Y | The booking details. See *Booking Details * object or null if no details are linked to it. |
| creation_date | unix timestamp | Y | The creation date of the token. |
| expiration_date | unix timestamp | Y | The expiration date of the token or null if no expiration date is set. |
| accept_until | unix timestamp | N | A unix timestamp which determines the date and time the customer is allowed to complete the operation. |
| customer | object | Y | The customer details. See Customer object. |
| payment_method | object | Y | The payment method details. See Payment_method object. This will be null until the customer fills in his payment method details. |
| moto_instance_id | int | Y | The moto_instance reference or null if the token was not created via a MOTO request. |
| mandate | object | Y | The mandate details. See Mandate object. |
| payment | object | Y | The payment details. See Payment object or null if no initial payment has been requested together with the token creation. |
| risk | object | N | The risk of the token. See Risk object. Will only be returned if a verification has been applied. |
Token statuses
| Status | Final | Description |
|---|---|---|
| ACTIVE | N | The token is active and can be detokenized. |
| REDIRECT | N | The token has not been created yet. We are still waiting for the customer to visit the provided redirect_url and enter the required details. |
| CANCELLED | Y | The token has been canceled and cannot be detokenized anymore. |
| EXPIRED | Y | The token is expired and cannot be detokenized anymore. |
| NOT_DETOKENIZABLE | Y | The token is not detokenizable due to the payment method not supporting detokenization. |
| TIMED_OUT | Y | The 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"
}
}
}