# 2. Decrease Debt

## Decrease Debt

<mark style="color:orange;">`PUT`</mark> `{{Base Adres}}/api/paywall/marketplace/debt/decrease/id`

{% hint style="info" %}
Important: To use the Debt Decrease service, you must include the parameters **apikeypublic** and **apiclientpublic** in the Header section.

\
[<mark style="color:green;">**PaymentAPI Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

{% hint style="warning" %}
To perform the relevant operation, the debt must not have been paid. Otherwise, the Paywall service will return an error message.
{% endhint %}

<table><thead><tr><th width="188">Parameter</th><th width="79">Type</th><th width="133.890625">Compolsory</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>The Public Key you obtained from the merchant panel.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>The Public Client you obtained from the merchant panel.</td></tr></tbody></table>

**The parameters that must be sent to the service are as follows:**

<table><thead><tr><th width="189">Parameter</th><th width="100.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Id</td><td>int</td><td>The ID information of the debt.</td></tr><tr><td>Debt</td><td>decimal</td><td>The amount by which you want to decrease the debt.</td></tr></tbody></table>

**Response returned from the service:**

<table><thead><tr><th width="189">Parameter</th><th width="100.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Error code. Returns the value '0' if the operation is successful.</td></tr><tr><td>Result</td><td>bool</td><td>Returns a value of 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. Language support is provided based on the locale parameter.</td></tr><tr><td>Body</td><td>object</td><td>Transaction detail information.</td></tr></tbody></table>

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

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": null
}
```

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