Get Token Status
GET/network-tokens/:tokenId
This endpoint retrieves the status of a network token.
The Network Tokenization SDK returns the result of the token provisioning in a promise object when the render function is executed. The integrator can handle this promise to perform additional steps. This should trigger your server (backend) to call the SmartPay API method Get Token to verify the status of the provisioned token.
Request
Path Parameters
The ID of the token to retrieve the status for.
Header Parameters
Must be application/json
Must be be en-US
The origin of the request
The client making the request
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Successful response with token status.
Evaluate the response parameter status
which should be:
ACTIVE
if the token has been provisioned successfully and became available for paymentsERROR
if the token provisioning has failed
Network token is returned in the field networkToken.tokenNumber
. It can be used for cryptogram requesting during the payments.
tokenNumber
, tokenReferenceIdentifier
and tokenId
must be stored for further requests or webhooks processing.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Possible values: <= 36 characters
The unique identifier for the token.
Possible values: <= 30 characters
The timestamp when the token was created.
Possible values: <= 30 characters
The timestamp when the token was last updated.
Possible values: <= 36 characters
The authorization ID associated with the token.
Possible values: <= 36 characters
The reference identifier for the token.
Possible values: <= 36 characters
The external merchant ID associated with the token.
Possible values: <= 6 characters
, [ACTIVE
, ERROR
]
The status of the token, either ACTIVE
or ERROR
.
networkToken
object
The Network token ID is generated through Create Network token.
Possible values: <= 36 characters
External identifier for the network token.
Possible values: <= 2 characters
, Value must match regular expression ^(0[1-9]|1[0-2])$
The month when the token expires.
Possible values: <= 2 characters
, Value must match regular expression ^\d{2}$
The year when the token expires.
Possible values: <= 16 characters
, Value must match regular expression ^\d{16}$
The actual token number.
tokenizedCardData
object
Possible values: <= 36 characters
Reference ID for the account holder.
Possible values: <= 2 characters
, Value must match regular expression ^(0[1-9]|1[0-2])$
The month when the card expires.
Possible values: <= 2 characters
, Value must match regular expression ^\d{2}$
The year when the card expires.
The brand of the card.
Possible values: <= 4 characters
, Value must match regular expression ^\d{4}$
The last four digits of the card number.
{
"tokenId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"authorizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tokenReferenceIdentifier": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalMerchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "ACTIVE",
"networkToken": {
"extIdentifier": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tokenExpiryMonth": "string",
"tokenExpiryYear": "string",
"tokenNumber": "string"
},
"tokenizedCardData": {
"accountHolderReferenceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expiryMonth": "string",
"expiryYear": "string",
"brand": "string",
"last4Digits": "string"
}
}
{
"tokenId": "e50a05f6-8e11-4409-a3bd-cda5a30e0e62",
"createdAt": "2023-03-21T11:58:57.463Z",
"updatedAt": "2023-03-21T11:59:40.305Z",
"authorizationId": "2dd604ca-37a8-44dc-8ea0-256b86f85a48",
"tokenReferenceIdentifier": "fedd8f16-d92b-495b-bec6-b9ec4e58b9b3",
"externalMerchantId": "9ff980b6-1fc6-4b61-9957-f8655b04cd9d",
"status": "ACTIVE",
"networkToken": {
"extIdentifier": "adbd5fe3-58ac-4569-b0c0-17398b5fc03a",
"tokenExpiryMonth": "01",
"tokenExpiryYear": "24",
"tokenNumber": "4125071111112119"
},
"tokenizedCardData": {
"accountHolderReferenceId": "ec7b936f-dcda-49ec-a186-3c17b6008392",
"expiryMonth": "01",
"expiryYear": "24",
"brand": "VISA",
"last4Digits": "1111"
}
}
Bad Request
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Value out of bounds. Value must be between 1 and 100",
"code": "value_out_of_bounds",
"property": "someField",
"context": {
"minimum": 1,
"maximum": 100
}
}
]
}
Unauthenticated
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "You are not authenticated to perform this request.",
"code": "unauthorized"
}
]
}
Forbidden
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "You do not have permissions to perform this request.",
"code": "forbidden"
}
]
}
Not Found
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Resource not found.",
"code": "not_found"
}
]
}
Internal Server Error
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Internal server error."
}
]
}