# 2. Hesap ile Bağlantı Kopar

## Hesap ile Bağlantı Kopart

<mark style="color:red;">`DELETE`</mark> `{{Base Address}}/api/paywall/masterpass/merchant/unlink`

Yukarıda verilmiş olan adrese istek atmanız yeterli olacaktır. Test ortamı ve Gerçek ortam için 'Base Address' istediğiniz gibi kullanabilirsiniz.

{% hint style="info" %}
Önemli: **Masterpass - Hesap ile Bağlantı Kopar** servisini kullanabilmeniz için 'Header' alanında '**apikeyprivate**' ve '**apiclientprivate**' parametrelerini göndermeniz gerekmektedir.\
\
[<mark style="color:green;">**PaymentAPI Adresi**</mark>](/ortam.md)
{% endhint %}

<table><thead><tr><th width="182">Parametre</th><th width="106.33333333333331">Tip</th><th width="97">Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>apikeyprivate</td><td>string</td><td>Evet</td><td>Üye işyeri panelinden temin etmiş olduğunuz Private Key.</td></tr><tr><td>apiclientprivate</td><td>string</td><td>Evet</td><td>Üye işyeri panelinden temin etmiş olduğunuz Private Client.</td></tr></tbody></table>

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

<table><thead><tr><th width="228">Parametre</th><th width="106">Tip</th><th width="123">Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>SessionId</td><td>Guid</td><td>Evet</td><td><a href="/pages/xpRDdgZPoDKXW4msT7aK">Oturum Kimliği</a> bilgisi</td></tr></tbody></table>

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

```json5
{
    "SessionId": "2193433e-f36b-1410-825e-001264113a90"
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
// Soon
```

{% endtab %}

{% tab title="GO" %}

```go
// Soon
```

{% endtab %}

{% tab title="Java" %}

```java
// Soon
```

{% endtab %}

{% tab title="PHP" %}

```php
// Soon
```

{% endtab %}

{% tab title="Python" %}

```python
// Soon
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
// Soon
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
// Soon
```

{% endtab %}

{% tab title="Curl" %}

```sh
// Soon
```

{% endtab %}
{% endtabs %}

**Servisten dönen cevap:**

<table><thead><tr><th width="156">Parametre</th><th width="83.33333333333331">Tip</th><th>Açılama</th></tr></thead><tbody><tr><td>Body</td><td>object</td><td>Ödemeye ilişkin detay içeren JSON (opsiyonel)</td></tr><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>True ya da false değeri döner. İşlem başarılı iste 'true' değerini döner</td></tr><tr><td>Message</td><td>string</td><td>İşlem hatalıysa, bu hataya dair belirtilen mesajdır, locale parametresine göre dil desteği sunar.</td></tr></tbody></table>

{% hint style="info" %}
**`Body > Masterpass > Result > StatusCode` ve `Body > Masterpass > Result > ResponseCode` dizini altındaki parametre kontrol edilerek akış kurulmalıdır**

* [**Masterpass ResponseCode Listesi**](/sistem-verileri/masterpass-cevap-kodlari.md)
  {% endhint %}

{% tabs %}
{% tab title="Başarılı ✅" %}

```json5
{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Session": {
            "SessionRenewed": false,
            "SessionId": "b827433e-f36b-1410-80e5-004205aa382d"
        },
        "Masterpass": {
            "Result": {
                "RetrievalReferenceNumber": "100005844116"
            },
            "BuildId": "83",
            "CorrelationId": "edde5b09-feb3-416d-9dde-d95558a12dd1",
            "Exception": null,
            "Message": "OK",
            "RequestId": null,
            "StatusCode": 200,
            "Version": null
        }
    }
}
```

{% endtab %}

{% tab title="Başarısız ❌" %}

```json
{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Session": {
            "SessionRenewed": true,
            "SessionId": "c427433e-f36b-1410-80e5-004205aa382d"
        },
        "Masterpass": {
            "Result": null,
            "BuildId": "83",
            "CorrelationId": null,
            "Exception": {
                "Level": "NotFound",
                "Code": "ACCOUNT_NOT_LINKED_TO_MERCHANT",
                "Message": "Hesap iş yerine bağlı değil."
            },
            "Message": "NotFound",
            "RequestId": null,
            "StatusCode": 404,
            "Version": null
        }
    }
}
```

{% 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/masterpass-entegrasyonu/2.-hesap-ile-baglanti-kopar.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.
