# 8. Disconnect

## Disconnect

<mark style="color:green;">`POST`</mark> `{{Base Adres}}/api/paywall/apm/unlink`

{% hint style="info" %}
Important To use the Disconnect service you must include the apikeypublic and apiclientpublic parameters in the Header\
\
[<mark style="color:green;">**PaymentAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

#### The header parameters to be sent to the service are as follows

<table><thead><tr><th width="182.65625">Parameter</th><th width="121.05078125">Type</th><th width="139.86328125">Compolsory</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>Public Key obtained from the merchant panel</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>Public Client obtained from the merchant panel</td></tr></tbody></table>

**The BODY parameters to be sent to the service are as follows**

<table><thead><tr><th width="183">Parameter</th><th width="107">Type</th><th width="141">Compulsory</th><th width="336">Description</th></tr></thead><tbody><tr><td>Phone</td><td>string</td><td>Yes</td><td>Payer phone number</td></tr><tr><td>ApmConnectionId</td><td>int</td><td>Yes/No</td><td>APM provider connection identity information returned during listing<br><br>* Required if ApmKey is not used</td></tr><tr><td>ApmKey</td><td>string</td><td>Yes/No</td><td>APM provider key information<br><br>See: <a href="/pages/SBmzwsUcnHQe4CKnuSWt">APM</a><br><br>* Required if ApmConnectionId is not used"</td></tr></tbody></table>

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

```json
{
    "Phone": "905342979639",
    "ApmConnectionId": null,
    "ApmKey": "Masterpass_IFrame"
}
```

{% endtab %}
{% endtabs %}

**The parameters returned from the service are as follows**

<table><thead><tr><th width="189">Parameter</th><th width="100.33333333333331">Type</th><th>Desciption</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Error code returns 0 if the operation is successful</td></tr><tr><td>Result</td><td>bool</td><td>Returns true or false if the operation is successful it returns true</td></tr><tr><td>Message</td><td>string</td><td>If the operation fails this is the message describing the error with language support based on the locale parameter</td></tr><tr><td>Body</td><td>object</td><td>If the operation fails this is the error detail object</td></tr></tbody></table>

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

```json
{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "ApmKey": "Masterpass_IFrame",
        "ApmConnectionId": 2013,
        "ProviderDummyResponse": {
            "ErrorCode": 0,
            "Body": {
                "Result": {
                    "RetrievalReferenceNumber": "100006348197"
                },
                "Version": null,
                "BuildId": "1",
                "StatusCode": 200,
                "Message": "OK",
                "CorrelationId": "ebff5f6c-f06f-4385-8818-5959daea682a",
                "RequestId": null,
                "Exception": null
            },
            "HttpCode": 200
        }
    }
}
```

{% 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/payment-orchestration-integration-document/alternative-methods-apm/8.-disconnect.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.
