# 2. İptal (Liste)

## **İptal (Liste) Servisi**

<mark style="color:green;">`POST`</mark> `{{Base Adres}}/api/paywall/payment/bulk/batch/cancel`

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

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

{% hint style="warning" %}
İptal işlemleri, ödemelerin gerçekleştiği aynı gün içerisinde gönderilmesi gereken işlemlerdir. Gün sonu alındıktan sonra ilgili işlemlerin kredi kartlarına sorunsuz geri gönderilebilmesi için iptal değil [**iade**](broken://pages/mxGmV7qk0o0zhH4gkzJ4) servislerinin kullanılması endüstriyel standarttır
{% endhint %}

{% hint style="info" %}
Toplu ödemeler kapsamında gerçekleşen işlemleri, tek tek iptal edebilirsiniz. Bunun için [iptal](/odeme-servisi/11.-iptal.md) servisini kullanmalısınız.
{% endhint %}

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

<table><thead><tr><th width="191">Parametre</th><th width="106">Tip</th><th width="112">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></tbody></table>

**İptal Detayları:**

<table><thead><tr><th width="215">Parametre</th><th width="167">Tip</th><th width="125">Zorunlu</th><th width="336">Açıklama</th></tr></thead><tbody><tr><td>Payments</td><td>Array&#x3C;Payment></td><td>Evet</td><td>İptal edilecek ödemelerin bilgisinin yer aldığı liste</td></tr><tr><td>CallbackUrl</td><td>string</td><td>Evet</td><td>Toplu iptal işlemi sonrasında bilgi gönderilecek API adresinizin bilgisi</td></tr></tbody></table>

**Servise gönderilecek örnek JSON ve örnek kodlar aşağıdaki gibidir:**

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

```json5
{
    "Payments": [
        {
            "MerchantUniqueCode": "PWL-010101010101",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010102",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010103",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010104",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010105",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010106",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010107",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010108",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010109",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010110",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010111",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010112",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010113",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010114",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010115",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010116",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010117",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010118",
            "Date": "2025-01-01"
        },
        {
            "MerchantUniqueCode": "PWL-010101010119",
            "Date": "2025-01-01"
        },
    ],
    "CallbackUrl": "https://yourwebsite.com/paywall/callback"
}
```

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

Servisten Dönen Parametreler

<table><thead><tr><th width="280">Parametre</th><th width="129.33333333333331">Tip</th><th>Açıklama</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Hata kodu. İşlem başarılı ise '0' değerini döner.</td></tr><tr><td>Result</td><td>bool</td><td>İşlem başarılı ise <strong>true</strong>, hatalı ise <strong>false</strong> döner.</td></tr><tr><td>Message</td><td>string</td><td>İşlemle ilgili bilgi veya hata mesajını içerir.</td></tr><tr><td><mark style="color:orange;">Body</mark> > Result</td><td>bool</td><td>İşlemin başarıyla teslim alınıp alınamadığını ifade eder. True olması durumda Paywall talebi başarıyla almış ve kuyruk mekanizmasına konumlandırmış demektir. Sonuçlar geri bildirim olarak iletilecektir</td></tr><tr><td><mark style="color:orange;">Body</mark> > TotalPaymentCount</td><td>int</td><td>Toplam işlem</td></tr></tbody></table>

**Servisten Dönen Örnek JSON**

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

```json
{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "Batch cancel created and enqueued",
    "Body": {
        "Result": true,
        "PaymentResults": [
            {
                "MerchantUniqueCode": "MCB1M36H3VLUO717FN7Y2ZE3EBN313DXG4OLXSLLDED7T",
                "Status": 1,
                "Message": "Added to normal bulk cancel process",
                "BulkPaymentId": 2683,
                "ErrorMessage": null,
                "BulkPaymentJobId": 0
            },
            {
                "MerchantUniqueCode": "MCB1M36H3VLUO717FN7Y2ZE3E2O5EFKX7L2ZG5WA52HB7",
                "Status": 1,
                "Message": "Added to normal bulk cancel process",
                "BulkPaymentId": 2683,
                "ErrorMessage": null,
                "BulkPaymentJobId": 0
            },
            {
                "MerchantUniqueCode": "MCB1M36H3VLUO717FN7Y2ZE3ETRUS2O6UQ9F5YPU2BDSA",
                "Status": 1,
                "Message": "Added to normal bulk cancel process",
                "BulkPaymentId": 2683,
                "ErrorMessage": null,
                "BulkPaymentJobId": 0
            },
            {
                "MerchantUniqueCode": "MCB1M36H3VLUO717FN7Y2ZE3E32PUM7BB2FCTH1B13C3G",
                "Status": 1,
                "Message": "Added to normal bulk cancel process",
                "BulkPaymentId": 2683,
                "ErrorMessage": null,
                "BulkPaymentJobId": 0
            }
        ]
    }
}
```

{% 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/2.-iptal/2.-iptal-liste.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.
