/Get access token

/Get access token



Request Endpoint

https://api.tbcbank.ge/v1/tpay/access-token

Authorization

Authorization TypeDescription
None

Request Parameters

Header Parameters

ParameterTypeDescription
apikeystringdeveloper app API key

Body Parameters

TBC E-Commerce merchant parameters client_id and client_secret should be passed in Body as
x-www-form-urlencoded parameters

details on how to get parameters, can be found here

ParameterTypeDescription
client_idstringTBC E-Commerce client_id (merchant id)
client_secretstringTBC E-Commerce client_secret

Request Sample

curl --location --request POST "https://api.tbcbank.ge/v1/tpay/access-token" \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "apikey: lXcDL8JJiAN8Vjlu6NW3kNeceOQolwnF" \
    --data "client_Id=712302&client_secret=76b9de"

Recipe

Response Parameters

ParameterTypeDescription
access_tokenstringThe access token value
token_typestringType of the token is set to "Bearer"
expires_inintegerThe lifetime in seconds of the access token

Response Sample

{
    "access_token": "eyJhbGciOiJKSeriiIsImtpZCI6IjVFMjBGMzQ2RUY1RjU2ODkxQTIyRkUzQUVCRjAzMzlGMzVDNjk1QjYiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJYaUR6UnU5ZlZva2FJdjQ2Nl9Bem56WEdsYlkifQ.eyJuYmYiOjE2MzE2NDQyNjEsImV4cCI6MTYzMTczMDY2MSwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50c2FwaS50YmNiYW5rLmdlLyIsImF1ZCI6WyJodHRwczovL2FjY291bnRzYXBpLnRiY2JhbmsuZ2UvcmVzb3VyY2VzIiwicGF5bWVudGFwaSJdLCJjbGllbnRfaWQiOiI3MDAwMDAyIiwic2NvcGUiOlsicGF5bWVudGFwaSJdfQ.GNIaxgik-ElXrvXOky5_1D1YjEEX5CB3eQHKPwvdCNhB-HvblqZ78QSNJcl6qLfL8gRTd0x9ASCgXu2z2RQYJ-wls0V2IwrQ7p4WEU-ON9QnasOjZWgPeVAtZQC_zjH9DdmL1GiDTIHLErhKDGl3YtSGcvPKSvTpABWda6HvF7lNGlEK0SZxzzt1i1SkpAnQfzIO1ATEmKdM1EmWzp5ZaDk0cF-Wzfk_2CrQAGofc80GT64U8WOXvVOx1gVYmjzqYs71XCOqfQdySYBIc-tbUC6YIoeSPZfu1hpi33Gz40ig57t4jxeE7Jh--38ydO4AGEw8BdlLv534O0V3ZoOddg",
    "expires_in": 86400,
    "token_type": "Bearer"
}
{
    "type": "https://developers.tbcbank.ge/error-reference#type-400",
    "title": "",
    "status": "400",
    "detail": "",
    "systemCode": "System code for problem is tpay-access-token.400.001",
    "code": ""
}

Note 400 Bad Request is often times returned when merchant parameters client_id / client_secret are incorrect. Please, double check if you receive error 400.

Error Response

In case of error, standard response in problem json will be returned.

Details can be found at Error Code Description