# Notifications Process

### <mark style="color:blue;">Deposit status notifications</mark> <a href="#deposit-status-notifications" id="deposit-status-notifications"></a>

Every time a deposit changes its status, we will send you an asynchronous notification to the `notification_url` you sent in the request or the one you have configured under the section "Settings -> API Access -> Confirm URL" containing the ID of the deposit.

<figure><img src="/files/4YichP4iQQBtkcRwaWyX" alt=""><figcaption></figcaption></figure>

**Once received the notification, you should check its new status with the**[ **Deposit Status Endpoint**](/english/api-documentation/deposit/deposit-status-endpoint.md) **and update it on your end accordingly.**

{% hint style="info" %}
Bear in mind we will only connect through ports 80 and 443.&#x20;

Make sure your `notification_url` has one of those ports open accepting connections from us.
{% endhint %}

### <mark style="color:blue;">STG Testing</mark> <a href="#stg-testing" id="stg-testing"></a>

In the STG environment, in order to test the full flow you can manually set a deposit to COMPLETED / CANCELLED status by login into the [**STG Tupay Panel**](https://merchants-stg.tupayonline.com/) and going to Transactions -> Deposits. Those options will change the status of the deposit, therefore **sending the respective notification to your `notification_url` after a few minutes**.

<div><figure><img src="/files/2Lri3YzWymclGsOxOkxh" alt=""><figcaption><p>Approve/Cancel from the Deposits view. <span data-gb-custom-inline data-tag="emoji" data-code="1f60e">😎</span></p></figcaption></figure> <figure><img src="/files/gNbJ3buFjJB8vERGcyiG" alt=""><figcaption><p>You can also Approve/Cancel deposits from the Transaction details</p></figcaption></figure></div>

### Notifications fields <a href="#notifications-fields" id="notifications-fields"></a>

```json
{
"deposit_id": 3000000001
}​
```

<table data-header-hidden><thead><tr><th width="155.33333333333331"></th><th width="101"></th><th></th></tr></thead><tbody><tr><td>Field</td><td>Format</td><td>Description</td></tr><tr><td><code>deposit_id</code></td><td>Number</td><td><p>Deposit identifier. </p><p>Use it to check the status of the Deposit.​​</p></td></tr></tbody></table>

### <mark style="color:blue;">Retry Logic and Resend Notifications</mark> <a href="#retry-logic" id="retry-logic"></a>

{% tabs %}
{% tab title="Retry Logic" %}
Every time a deposit changes its status, we will send you a notification so you can [check its status](/english/api-documentation/deposit/deposit-status-endpoint.md) back.\
In case that for some reason your server was unable to handle our notification and you returned an HTTP code different than 2XX, we will retry the notification up to 5 more times or until you respond with HTTP 2XX, whatever comes first.

{% hint style="info" %}
In case of errors while handling the notification, make sure you will answer with an HTTP code distinct than 2XX, that way we will retry the notification.
{% endhint %}

The time between each of the 5 notifications attempts will be exponential: 5, 25, 125 and 625 minutes accordingly.\
When a notification failed to be sent, it will be shown like this in our Tupay Panel:

<figure><img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9WWikD8y9ipNcz8Cq5%2F-M9_UqvQBGblaqYL1-oD%2Fimage.png?alt=media&#x26;token=a4343fd9-589b-4e31-bfc8-850daf84e58b" alt=""><figcaption></figcaption></figure>

If you see the errors from the screenshot above, it means the payment was successfully completed and the money was credited to your account but suddenly we couldn't notify you. Keep reading to know how to resend the notifications.​
{% endtab %}

{% tab title="Resend Notifications" %}
In case your system was unable to handle the notification in any of the 5 attempts, you can always check its status with the [Deposit Status Endpoint.](/english/api-documentation/deposit/deposit-status-endpoint.md)​

If you need to trigger the check status by receiving our notification, once the issue preventing you from receiving our notifications was fixed, you can go to the Tupay Panel, locate the deposit (Transactions -> Deposits) and click on the three dots button under the "Status History" section and then "Resend notification" to force a new notification to be sent.

{% hint style="success" %}
It can take up to 1 minute for the notification to be resent.
{% endhint %}

<figure><img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9zSa_quB7AK0C4EfRV%2F-M9zU27QNwGCCPG-JJEq%2Fimage.png?alt=media&#x26;token=3a420e35-11b0-4e22-9110-61a72568f557" alt=""><figcaption></figcaption></figure>
{% 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://docs.tupayonline.com/english/api-documentation/deposit/notifications-process.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.
