Login

User Authentication and Authorization Initialization

post
/in-store/oauth2/authorize

This service starts the authorization step and generates an "auth code".

Flow:

  1. A request is sent to this service with a form-urlencoded body.

  2. The "code" value in the response is received.

  3. The received "code" value is used in the "Get Token with Auth Code" service to generate a token.

Body
scopestring · enumRequired

Default value: iyzipayApiGateway

Possible values:
client_idstringRequired

Merchant-specific client_id value provided by iyzico.

client_secretstringRequired

Merchant-specific client secret value generated by iyzico.

response_typestring · enumRequired

Default value: code

Possible values:
usernamestringRequired

Username

passwordstringRequired

User password

request_timestampstringRequired

Unix timestamp value of the relevant request.

Responses
chevron-right
200

Success

application/json
codestringOptional

Auth Code

issuedAtstringOptional

Transaction date

expiredAtstringOptional

Transaction validity date

post
/in-store/oauth2/authorize

Sample Collection

Get Token with Auth Code / Refresh Token

post
/in-store/oauth2/token

This service generates access_token and refresh_token using the auth code.

Authorization (Basic Auth):

  • Username: client_id

  • Password: client_secret Header format: Authorization: Basic base64(client_id:client_secret)

Flow (Auth Code):

  1. The "code" returned from /authorize call is retrieved.

  2. It is sent to this service with a form-urlencoded body:

    • grant_type=authorization_code

    • code={authCode}

  3. From the response:

    • access_token: Used as Bearer Token in Terminal Host services.

    • refresh_token: Stored for token renewal.

    • expires_in: access_token validity period (seconds).

Authorizations
AuthorizationstringRequired

Authorization with Basic Auth. Postman Basic Auth fields:

  • Username: client_id
  • Password: client_secret

HTTP header equivalent: Authorization: Basic base64(client_id:client_secret)

Body
or
Responses
chevron-right
200

Success

application/json
access_tokenstringOptional

Access Token Value

refresh_tokenstringOptional

Refresh Token Value

scopestring · enumOptional

Default Scope Value

Possible values:
token_typestringOptional

Token type used in authorization

expires_ininteger · int32Optional

Validity period in seconds.

post
/in-store/oauth2/token

Get Token with Refresh Token

post
/in-store/oauth2/token/refresh

This service generates a new access_token using the refresh_token (token renewal).

Authorization (Basic Auth):

  • Username: client_id

  • Password: client_secret Header format: Authorization: Basic base64(client_id:client_secret)

Flow:

  1. The "refresh_token" received from the previous token call is stored.

  2. It is sent to this service with a form-urlencoded body:

    • grant_type=refresh_token

    • refresh_token={refresh_token}

  3. The new access_token is received from the response and used in Terminal Host services.

Authorizations
AuthorizationstringRequired

Authorization with Basic Auth. Postman Basic Auth fields:

  • Username: client_id
  • Password: client_secret

HTTP header equivalent: Authorization: Basic base64(client_id:client_secret)

Body

Generates a JWT token using the Refresh Token. Basic Auth is performed with client_id and client_secret.

grant_typestring · enumRequired

Transaction type for token generation

Possible values:
refresh_tokenstringRequired

Refresh token value to be used for token renewal.

Responses
chevron-right
200

Success

application/json
access_tokenstringOptional

Access Token Value

refresh_tokenstringOptional

Refresh Token Value

scopestring · enumOptional

Default Scope Value

Possible values:
token_typestringOptional

Token type used in authorization

expires_ininteger · int32Optional

Validity period in seconds.

post
/in-store/oauth2/token/refresh

Sample Collection

Last updated