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
Name | Mandatory | Type | Description |
---|---|---|---|
type | + | string | Request type: subscription_token |
subscription_token | + | object | Subscription token details |
token | + | string | Token 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
Name | Mandatory | Type | Description |
---|---|---|---|
status | + | string | Status. Options: error , ok |
info | - | object | Subscription token details |
token | + | string | Token you transmitted in the request |
created_at | + | string | Creation date in ISO 8601 format |
finished_at | + | string | Completion date in ISO 8601 format |
is_active | + | bool | Whether the token can be used for an operation: true —yes, false —no |
country | + | string | Country the token belongs to |
error | - | object | Error details |
code | + | string | Error code |
description | + | string | Error 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"
}
}