# Session Sorgulama

Bu servis, gerçekleştirilen işlem sonrasında, oluşturulan session'ın güncel durumunun görüntülenmesi için kullanılmaktadır. Sorgulanacak session için, başlatılan ödeme akışına ait bilgiler, ödeme formuna ait `checkoutFormToken` ve ilgili işleme ait `paymentId` parametreleri gönderilerek sorgulanabilir.

Servis çıktısında doğrudan ödeme detayları yerine; session’a ait bilgiler dönmektedir. Bu kapsamda `sessionToken`, `memberIdentifier`, `sessionStatus` ve `paymentType` gibi alanlar üzerinden oturumun durumu ve kullanıcıya ait bilgiler takip edilebilir.

Özellikle ödeme akışı tamamlandıktan sonra, session’ın son durumunun kontrol edilmesi ve kullanıcıya ait oturum bilgilerinin elde edilmesi amacıyla bu servisin kullanılması önerilmektedir. Böylece ödeme süreci, client tarafındaki yönlendirmelere bağımlı kalmadan güvenli bir şekilde izlenebilir.

### Session Sorgulama

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

#### **Headers**

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

### Örnek İstek

```json
{
  "locale": "tr",
  "conversationId": "123456789",
  "checkoutFormToken": "ab468ec8-c4ab-4449-b15b-69782f7786c6",
  "paymentId": "29414275"
}
```

### **İstek Parametreleri**

<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>checkoutFormToken</code></td><td>string</td><td>Evet</td><td>Yapılan işleme ait ödeme formunun token değeri.</td></tr><tr><td><code>locale</code></td><td>string</td><td>Hayır</td><td>İstek için gönderilen dil değeri. EN ve TR değerini alabilir.</td></tr><tr><td><code>conversationId</code></td><td>string</td><td>Hayır</td><td>İstek esnasında gönderip, sonuçta alabileceğiniz bir değer, request/response eşleşmesi yapmak için kullanılabilir.</td></tr><tr><td><code>paymentId</code></td><td>string</td><td>Evet</td><td>Gerçekleştirilen ödeme işlemine ait, ödeme numarası değeri.</td></tr></tbody></table>

### Örnek Yanıt

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

```json
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1775471642206,
    "sessionInfo": {
        "sessionToken": "f2f06a82-6480-4d2b-811d-93168ddce577",
        "sessionStatus": "PASSIVE",
        "memberIdentifier": "702831f3-1cc6-4b25-ad2b-878afc64f408",
        "paymentType": "CARD_PAYMENT"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "status": "failure",
    "errorCode": "260016",
    "errorMessage": "Session token bulunamadı.",
    "systemTime": 1775471996773
}
```

{% endtab %}
{% endtabs %}

### **Dönüş Parametreleri**

<table><thead><tr><th width="190.3515625">Paremetre</th><th>Tip</th><th>Açıklama</th></tr></thead><tbody><tr><td><code>status</code></td><td>string</td><td>Gönderilen isteğin sonucu.</td></tr><tr><td><code>locale</code></td><td>string</td><td>İstekte gönderilen dil değeri. </td></tr><tr><td><code>systemTime</code></td><td>Long</td><td>İşlem zamanı (epoch ms).</td></tr><tr><td><code>sessionToken</code></td><td>string</td><td>Member'ın yaptığı ödeme işlemine ait session key bilgisidir.</td></tr><tr><td><code>sessionStatus</code></td><td>string</td><td>Kullanıcıya ait session durumudur. <code>ACTIVE</code> veya <code>PASSIVE</code> değerlerini alır.</td></tr><tr><td><code>memberIdentifier</code></td><td>string</td><td>Member unique key bilgisidir. </td></tr><tr><td><code>paymentType</code></td><td>string</td><td>Ödeme tipini belirtir. FUND veya CARD_PAYMENT değerlerini dönebilir.<br>FUND: Bakiye Ödemesi<br>CARD_PAYMENT: Kart Ödemesi</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/odeme-metotlari/tokenize-cuzdan-odemesi/tokenization-entegrasyonu/session-sorgulama.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.
