# 2. Defer Earnings

## **Product-Based Earnings Deferral**

<mark style="color:orange;">`PUT`</mark> `{{Base Adres}}/api/paywall/marketplace/earning/postpone/product`

{% hint style="info" %}
Önemli: **Ürün Bazlı Kazanç Erteleme** servisini kullanabilmeniz için 'Header' alanında '**apikeypublic**' ve '**a**To use the service, you must include the **apikeyprivate** and **apiclientprivate** parameters in the header.\
\
[<mark style="color:green;">**PaymentAPI Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

<table><thead><tr><th width="188">Parameter</th><th width="79">Type</th><th width="118.88671875">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 parameters to 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>ProductId</td><td>int</td><td>Product ID information. It is returned in the Paywall response object at the time of payment.</td></tr><tr><td>Day</td><td>int</td><td>Number of days to defer the earnings. If set to 10, the earnings will be paid 10 days after the original date.</td></tr><tr><td>ApplyAll</td><td>bool</td><td><p>It affects both the earnings for the product and the platform's (your) earnings associated with the product.</p><p></p><p>Example: If <code>TRUE</code> is sent, both your seller's earnings and your platform earnings will be affected.</p></td></tr></tbody></table>

**Response returned from the service:**

<table><thead><tr><th width="189">Parameter</th><th width="100.33333333333331">Type</th><th>Descripiton</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 a true or false value. Returns 'true' if the operation is successful.</td></tr><tr><td>Message</td><td>string</td><td>If the operation fails, this is the message describing the error, and it supports localization based on the locale parameter.</td></tr><tr><td>Body</td><td>object</td><td>Detailed information about the transaction</td></tr></tbody></table>

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

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

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