Access Token Retrieval

An accessToken is required to trigger a tokenization payment and retrieve the details of the latest payment. By making a request to this service, you can obtain the necessary accessToken.

The generated accessToken is valid for 5 minutes.

Access Token Retrieval

POST https://api.iyzipay.com/v1/pay-with-iyzico/third-party-session/retrieve/access-token

Headers

Name
Value

Content-Type

application/json

Authorization

Authorization

Request Parameters

Parameter
Type
Required
Description

sessionToken

String

Yes

This is the session key information that the Member pays in the same payment type.

memberIdentifier

String

Yes

Member unique key information. This key is used for member information in payment transactions.

locale

String

No

Used to set the language of the texts returned as a result of iyzico request. The default value is en. can be used as en.

conversationId

String

No

A value that you can send during the request and receive at the end can be used to match request/response. The most common use case is the merchant's order number.

Request

{
    "sessionToken": "{{sessionToken}}",
    "memberIdentifier": "{{memberIdentifier}}",
    "locale": "en",
    "conversationId": "test"
}

Response

{
    "status": "success",
    "locale": "en",
    "systemTime": 1749027862133,
    "conversationId": "test",
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiItIiwic2NvcGUiOlsidGhpcmRQYXJ0eVNlc3Npb24iXSwic2Vzc2lvblRva2VuIjoiZDUzZWRiNzItNTNmMy00NmY0LTk5NWQtNDM1NzBhOTdiZDg4IiwiZXhwIjoxNzQ5MDI4MjIyLCJhdXRob3JpdGllcyI6WyJwd2lfdHBfc2Vzc2lvbl9jYXJkX2F1dGgiLCJwd2lfdHBfc2Vzc2lvbl9pbml0M2RzX2F1dGgiLCJwd2lfdHBfc2Vzc2lvbl9sYXN0X3BheW1lbnRfcmV0cmlldmUiLCJwd2lfdHBfc2Vzc2lvbl9mdW5kX2F1dGgiXSwianRpIjoiMTUwODdmNTgtZGE4Yy00OTFhLWFjN2QtYmYyODI2ODNmMGRlIiwiY2xpZW50X2lkIjoidGhpcmRQYXJ0eVNlc3Npb25DbGllbnQifQ.YC5McE1SdXrPeCpljrMU1X3kzc3FV7I8DoZ5G0qcS30"
}

Response Parameters

Parameter
Type
Description

status

String

Refers to the request result. success or failure values can be returned.

locale

String

Refers to the language of the returned response.

systemTime

Long

The current unix timestamp of the returned result.

conversationId

String

The value sent during the request is returned.

accessToken

String

The bearer token information for the Member to trigger payments through services.

errorCode

String

If the operation was failed, this is the code that indicates the failure.

errorMessage

String

If the operation is failed, this is a message detailing the error, with language support according to the locale parameter.

Last updated