Skip to main content

token/info

token/info

Operations with bank cards are often carried out with tokenized values. For payouts and payments through widgets, a public token is created. A token can also be created for recurring payments/payouts.

Use this method to learn the hidden card number and show the user from which card the funds will be debited, or to check the token expiration date.

Endpoint

api/v1/token/info

Request parameters

NameMandatoryTypeDescription
type+stringRequest type. Options: card, public_token, recurrent_token
card- (mandatory for
type = card)
objectBank card details
public_token- (mandatory for
type = public_token)
objectPublic token details
recurrent_token- (mandatory for
type = recurrent_token)
objectRecurring payment token details
Request examples

Send tokenized bank card details to get the hidden card number and payment system.

    curl --location --request POST 'https://demo.smart-glocal.com/api/v1/token/info' \
--header 'X-PARTNER-PROJECT: your_project_name' \
--header 'X-PARTNER-SIGN: signature' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "card",
"card": {
"type": "encrypted_card",
"encrypted_card": {
"number_hash": "card_number_hash (token)"
}
}
}'

Response parameters

NameMandatoryTypeDescription
status+stringStatus. Options: error, ok
info-objectDepending on the request type (type):
- card token information
- public token information
- information on the token for recurring payments
error-objectError description
Successful response examples
 {
"status": "ok",
"info": {
"number_hash": "card_number_hash",
"brand": "visa",
"last4": "4242",
"type": "card"
}
}
Unsuccessful response example
{
"status": "error",
"error": {
"description": "error description",
"code": "error code"
}
}