# PayWatch

**Overview:** The related algorithm is triggered when payments remain in a pending state and, by default, checks the payment status after 25 minutes. For payments that remain pending, it sends a notification indicating the final status. In order for this notification to be sent, you must configure the PayWatch setting at the time the payment order is created. Otherwise, Paywall will still perform the status check but will not send you a notification.

<table><thead><tr><th>Key</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>PayWatchId
</code></pre></td><td>PayWatch identifier (sent for informational purposes only)</td></tr><tr><td><pre><code>PaymentId
</code></pre></td><td>Payment identifier</td></tr><tr><td><pre><code>MerchantUniqueCode
</code></pre></td><td>Tracking number provided at the time of payment creation</td></tr><tr><td><pre><code>PaymentLastStatusId
</code></pre></td><td><p>The status of the payment before PayWatch intervention</p><p><br>See: <a href="broken-reference">Review </a></p></td></tr><tr><td><pre><code>PaymentNewStatusId
</code></pre></td><td><p>The status of the payment after PayWatch intervention</p><p><br>See: <a href="broken-reference">Review</a></p></td></tr><tr><td><pre><code>PaymentStatusChanged
</code></pre></td><td>Was there a change in the payment status?<br><strong>Example</strong>: Started → Successful</td></tr><tr><td><pre><code>ProviderRequest
</code></pre></td><td>The request sent to the provider at the time of payment inquiry</td></tr><tr><td><pre><code>ProviderResponse
</code></pre></td><td>The response received from the provider at the time of payment inquiry</td></tr><tr><td><pre><code>ProviderHttpStatus
</code></pre></td><td>The HTTP response received from the provider at the time of inquiry</td></tr><tr><td><pre><code>PaymentDateTime
</code></pre></td><td>The date of the payment</td></tr><tr><td><pre><code>Hash
</code></pre></td><td><p>It is the Hash value used to verify that the request originated from Paywall. It is generated using the <code>System Webhook Hash Key</code> created in the Paywall panel.</p><p></p><p>The key mentioned above may vary depending on the value of the <code>HashKeyType</code> parameter. A dynamic structure should be implemented.</p></td></tr><tr><td><pre><code>HashFormat
</code></pre></td><td>The format type used to generate the hash value<br><br>Bkz: <a href="broken-reference">Hash Formats</a></td></tr><tr><td><pre><code>HashKeyType
</code></pre></td><td>The type of key used in generating the hash value<br><br>See: <a href="broken-reference">Key Types </a></td></tr></tbody></table>

```csharp
public class PayWatchCallbackRequest
{
    public int PayWatchId { get; set; }
    public int PaymentId { get; set; }
    public string MerchantUniqueCode { get; set; }
    public int PaymentLastStatusId { get; set; }
    public int PaymentNewStatusId { get; set; }
    public bool PaymentStatusChanged { get; set; }
    public object ProviderRequest { get; set; }
    public object ProviderResponse { get; set; }
    public int ProviderHttpStatus { get; set; }
    public DateTime PaymentDateTime { get; set; }
}
```
