# Session Expire

This service is used to terminate an active session. To finalize the session termination, the `sessionToken` and the corresponding `memberIdentifier` must be provided.

After the service call, the session is set to a passive (`PASSIVE`) status. Following this, any checks performed via the session retrieval service will return the session status as `PASSIVE`.

Once the session is marked as passive, no further payment transactions can be performed using that session. This ensures that incomplete or abandoned sessions are properly managed and that the payment flow remains secure and controlled.

### Session Expire

<mark style="color:green;">`POST`</mark> `https://api.iyzipay.com/v1/pay-with-iyzico/third-party-session/invalidate/session`

#### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Authorization`    |

### Request

```json
{
    "locale": "tr",
    "conversationId": "123456789",
    "sessionToken": "f2f06a82-6480-4d2b-811d-93168ddce577",
    "memberIdentifier": "702831f3-1cc6-4b25-ad2b-878afc64f408"
}
```

### **Request Parameters**

<table><thead><tr><th width="190.3515625">Paremetre</th><th>Tip</th><th>Zorunluluk</th><th>Açıklama</th></tr></thead><tbody><tr><td><code>sessionToken</code></td><td>string</td><td>Evet</td><td>Token value of the session to be expired.</td></tr><tr><td><code>memberIdentifier</code></td><td>string</td><td>Evet</td><td>Unique key information of the member associated with the session.</td></tr><tr><td><code>locale</code></td><td>string</td><td>Hayır</td><td>Language value sent in the request. Can be <code>EN</code> or <code>TR</code>.</td></tr><tr><td><code>conversationId</code></td><td>string</td><td>Hayır</td><td>A value sent within the request and returned in the response, used to match request and response.</td></tr></tbody></table>

### **Response**&#x20;

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "locale": "en",
    "systemTime": 1775484679584,
    "conversationId": "test",
    "sessionToken": "0636d0cf-b54e-4896-b3f2-91f69e9c6b11",
    "memberIdentifier": "702831f3-1cc6-4b25-ad2b-878afc64f408"
}

```

{% endtab %}

{% tab title="400" %}

```json
{
    "status": "failure",
    "errorCode": "260030",
    "errorMessage": "Session is already invalidated at 4/6/26, 5:11 PM.",
    "locale": "en",
    "systemTime": 1775484702256,
    "conversationId": "test"
}
```

{% endtab %}
{% endtabs %}

### **Response Parameters**

<table><thead><tr><th>Parametre İsmi</th><th width="103.33333333333331">Tip</th><th>Açıklama</th></tr></thead><tbody><tr><td><code>status</code></td><td>String</td><td>Indicates the result of the request. Returns <code>success</code> if successful, <code>failure</code> if unsuccessful.</td></tr><tr><td><code>systemTime</code></td><td>Long</td><td>The Unix timestamp of the response time.</td></tr><tr><td><code>errorCode</code></td><td>String</td><td>The error code returned if the transaction fails.</td></tr><tr><td><code>errorMessage</code></td><td>String</td><td>The error message returned if the transaction fails. It is localized based on the <code>locale</code> parameter.</td></tr><tr><td><code>conversationId</code></td><td>String</td><td>If sent in the request, it is returned in the response unchanged. It is only returned in failed responses.</td></tr><tr><td><code>locale</code></td><td>String</td><td>The locale value sent in the request is returned. The default value is <code>tr</code>. It is only returned in failed responses.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iyzico.com/en/payment-methods/tokenization/tokenization-integration/session-expire.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
