Skip to main content

token/info

The token/info method allows getting information on subscription tokens used in the Donate product. It returns token details, including the card issuer's country (BIN country).

Endpoint

api/v1/token/info

Request parameters

NameMandatoryTypeDescription
type+stringRequest type: subscription_token
subscription_token+objectSubscription token details
  token+stringToken to verify

Request example

   curl -X POST \
'https://proxy.smart-glocal.com/api/v1/token/info' \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "subscription_token",
"subscription_token": {
"token": "your_token"
}
}'

Response parameters

NameMandatoryTypeDescription
status+stringStatus. Options: error, ok
info-objectSubscription token details
  token+stringToken you transmitted in the request
  created_at+stringCreation date in ISO 8601 format
  finished_at+stringCompletion date in ISO 8601 format
  is_active+boolWhether the token can be used for an operation: true—yes, false—no
  country+stringCountry the token belongs to
error-objectError details
  code+stringError code
  description+stringError description

Successful response examples

{
"status": "ok",
"info": {
"token": "your_token",
"created_at": "2021-03-17T14:10:56+03:00",
"finished_at": "2021-03-18T14:10:56+03:00",
"is_active": true,
"country": "USA"
}
}

Unsuccessful response example

{
"status": "error",
"error": {
"description": "error description",
"code": "error code"
}
}