# 4. Sorgula

## Toplu **Ödeme Sorgulama Servisi**

<mark style="color:blue;">`GET`</mark> `{{Base Adres}}/api/paywall/payment/bulk/payment/query`

{% hint style="info" %}
**Önemli:** Toplu ödeme sorgulama servisini kullanabilmeniz için **Header** alanında **apikeypublic** ve **apiclientpublic** parametrelerini göndermeniz gerekmektedir.

[<mark style="color:green;">**PaymentAPI Adresi**</mark>](/ortam.md)
{% endhint %}

**Servise gönderilmesi gereken parametreler şu şekildedir:**

<table><thead><tr><th width="220">Parametre</th><th width="106">Tip</th><th width="110">Zorunlu</th><th width="336">Açıklama</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Evet</td><td>Üye işyeri panelinden temin etmiş olduğunuz Public Key.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Evet</td><td>Üye işyeri panelinden temin etmiş olduğunuz Public Client.</td></tr><tr><td>merchantuniquecode</td><td>string</td><td>Evet</td><td>Üye işyerine özel benzersiz tanımlayıcı koddur. İşlem başlatma anında parametre olarak Paywall'a gönderilir</td></tr><tr><td>pageSize</td><td>int</td><td>Evet</td><td>Listelenmesi istenen işlem adedi<br><br><mark style="color:purple;">* Maks 1000</mark></td></tr><tr><td>pageNumber</td><td>int</td><td>Evet</td><td>Sayfa numarası</td></tr></tbody></table>

**Servisten Dönen Cevap >** <mark style="color:blue;">Ana Dizin</mark>

<table><thead><tr><th width="307">Parametre</th><th width="167.33333333333331">Tip</th><th>Açıklama</th></tr></thead><tbody><tr><td>Result</td><td>bool</td><td>İşlem'in başarıyla Paywall tarafından teslim alınıp alınmadığını belirtir. Başarılı (true) dönmesi durumunda ödemelerin başarılı olduğunu değil, ödemelerin işlenmek için başarıyla teslim alındığını ifade eder. Ödeme sonuçları geri bildirim olarak iletilecektir.</td></tr><tr><td>TotalPaymentCount</td><td>int</td><td>Toplam işlem adedi</td></tr><tr><td>TotalPaymentAmount</td><td>decimal</td><td>Toplam işlem tutarı</td></tr><tr><td>TotalSuccessPaymentCount</td><td>int</td><td>Toplam başarılı işlem adedi</td></tr><tr><td>TotalSuccessPaymentAmount</td><td>decimal</td><td>Toplam başarılı işlem tutarı</td></tr><tr><td>TotalUnsuccessfulPaymentCount</td><td>int</td><td>Toplam başarısız işlem adedi</td></tr><tr><td>TotalUnsuccessfulPaymentAmount</td><td>decimal</td><td>Toplam başarısız işlem tutarı</td></tr><tr><td>TotalUnprocessedPaymentCount</td><td>int</td><td>Yaşanabilecek felaket senaryoları kapsamında işlenemeyen işlem adedi</td></tr><tr><td>TotalUnprocessedPaymentAmount</td><td>decimal</td><td>Yaşanabilecek felaket senaryoları kapsamında işlenemeyen işlem tutarı</td></tr><tr><td>PageNumber</td><td>int</td><td>Listelenmek istenen sayfa numarası</td></tr><tr><td>PageSize</td><td>int</td><td>Listelenmek istenen işlem adedi</td></tr><tr><td>TotalPages</td><td>int</td><td>Toplam sayfa sayısı</td></tr><tr><td>Payments</td><td>List&#x3C;Payment></td><td>Her işlemin kendi içindeki detaylarını içerir<br><br><strong>Not: Eğer işlemler tekil iade/iptal edilmek istenirse. Her ödemenin </strong><mark style="color:red;"><strong>MerchantUniqueCode</strong></mark><strong> parametresini kendi tarafınızda saklamanız gerekmektedir</strong></td></tr></tbody></table>

**Servisten Dönen Cevap >** <mark style="color:blue;">Ana Dizin</mark> <mark style="color:orange;">`Payments`</mark>

<table><thead><tr><th width="225">Parametre</th><th width="115.33333333333331">Tip</th><th>Açıklama</th></tr></thead><tbody><tr><td>MerchantUniqueCode</td><td>string</td><td>Her işlem için Paywall tarafından otomatik atanır. Tekil olarak işlem müdahale edilmek istenirse (iptal, iade) saklanmalıdır</td></tr><tr><td>PaymentId</td><td>int</td><td>İşlemin Paywall sistemindeki Id bilgisidir</td></tr><tr><td>Amount</td><td>decimal</td><td>İşlemin tutar bilgisidir</td></tr><tr><td>Status</td><td>int</td><td>İşlemin durum bilgisidir<br><br><a href="/pages/mrO7Ldm0PcNWZXhNk5gq">Ödeme durumları</a></td></tr><tr><td>Scope</td><td>int</td><td>İşlemin kapsamı (Satış, İptal, İade)<br><br><a href="/pages/lKKjlHSFhNub8tANQcXz">Ödeme tipleri</a></td></tr></tbody></table>

**Servisten Dönen Örnek JSON**

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
    "Result": true,
    "TotalPaymentCount": 50000,
    "TotalPaymentAmount": 271600884.87,
    "TotalSuccessPaymentCount": 50000,
    "TotalSuccessPaymentAmount": 271600884.87,
    "TotalUnsuccessfulPaymentCount": 0,
    "TotalUnsuccessfulPaymentAmount": 0.00,
    "TotalUnprocessedPaymentCount": 0,
    "TotalUnprocessedPaymentAmount": 0.00,
    "PageNumber": 1,
    "PageSize": 10,
    "TotalPages": 5000,
    "Payments": [
        {
            "MerchantUniqueCode": "3b9b6c35-9161-424e-808b-0879f1152e77",
            "PaymentId": 6769626,
            "Amount": 5819.96,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "6863656",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "59e45924-b2c2-44f1-819c-dc530ab09c48",
            "PaymentId": 6769625,
            "Amount": 3026.24,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "2933052",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "f5937fed-5563-4f4a-b7ed-7231418c6798",
            "PaymentId": 6769624,
            "Amount": 9796.11,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "7523894",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "bb08b8fe-fe88-45a0-9eab-34cc16d7c2b6",
            "PaymentId": 6769623,
            "Amount": 7387.62,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "2500593",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "34d02a72-622d-46f0-9aa7-c4db3bb53472",
            "PaymentId": 6769622,
            "Amount": 2057.11,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "8189093",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "eb41111f-2734-4bb0-aed8-dd2999ceee51",
            "PaymentId": 6769621,
            "Amount": 8709.33,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "8547965",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "af683f13-96f1-4301-b0df-be5ca9e08778",
            "PaymentId": 6769620,
            "Amount": 7477.32,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "9464594",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "f9a64014-7068-476f-93e1-339e42fdfc38",
            "PaymentId": 6769617,
            "Amount": 3689.10,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "1699939",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "ccee7212-6165-4b9d-a5d2-1e336a02f7be",
            "PaymentId": 6769616,
            "Amount": 6208.69,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "9344021",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        },
        {
            "MerchantUniqueCode": "08688623-9820-4fc4-912e-15148e32efab",
            "PaymentId": 6769615,
            "Amount": 9583.22,
            "Status": 4,
            "Scope": 1,
            "TrackingCode": "8173486",
            "PaymentGatewayId": 1279,
            "PaymentGatewayName": "İyzicoReal",
            "PaymentGatewayProviderId": 1,
            "PaymentGatewayProviderKey": "",
            "PaywallErrorCode": "",
            "ProviderErrorCode": "",
            "ProviderErrorMessage": "",
            "BankErrorCode": "",
            "BankErrorMessage": ""
        }
    ],
    "UnprocessedPayments": []
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# 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://developer.paywall.one/odeme-servisi/18.-toplu-islem-yontemi/4.-sorgula.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.
