# Notifications

Every time a deposit changes its status, we will send you an asynchronous notification containing the ID of the deposit.\
The webhooks are sent to:

1. the **`notification_url`**  you sent in the request, or&#x20;
2. to the one you have configured under the section: ***Settings***  :arrow\_right:  ***API Access*** :arrow\_right: ***Confirm URL.***

**Once received the notification, you should check its new status with the** <a href="https://app.gitbook.com/s/VNE8t2FopKfzgQzTjlBb/deposits-api/manage-payments/get-deposit-status" class="button primary" data-icon="magnifying-glass">Get deposit status</a> **endpoint** **and update it on your end accordingly.**

{% hint style="success" %}

### Firewall configurations

Bear in mind we will only connect through ports 80 and 443. \
Make sure your **`notification_url`** has one of those ports open accepting connections from us.
{% endhint %}

#### Example notification

```javascript
{
    "deposit_id": 3000000001
}
```

<table><thead><tr><th width="148.98567708333331">Field</th><th width="155.37109375">Format</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>deposit_id</code></strong></td><td>Number</td><td>ID of the deposit. Use this ID to <a href="https://app.gitbook.com/s/VNE8t2FopKfzgQzTjlBb/deposits-api/manage-payments/get-deposit-status">check the status of the deposit.</a></td></tr></tbody></table>

### Testing notification in Staging

Receiving notifications accordingly is part of our [integration requirements checklist](https://docs.pandablue.com/guides/getting-started/start-testing#integration-checklist).

In the <mark style="color:$danger;background-color:red;">**Staging**</mark> environment, in order to test the full flow you can manually set a deposit to **COMPLETED** or **CANCELLED** status by: Logging in into the [STG Merchant Panel](https://merchants-stg.d24.com/login)  :arrow\_right:  Transactions :arrow\_right:  Deposits.

Those options will change the status of the deposit, therefore **sending the respective notification to your `notification_url` after a few minutes**.

![Approve/Cancel from the Deposits view.](https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/Z1A5RbOQSKKEsA5H75cT/Grid%20STG%20with%20actions.png) ![You can also Approve/Cancel deposits from the Transaction details](https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/PXyc228xunN8CvgJ1pZ5/Transaction%20details%20STG.png)

## Retry logic

Every time a deposit changes its status, we will send you a notification so you can check its status 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="success" %}
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 Merchant Panel:

![](https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/i7nwfB5BzYkX0ZuU3C1N/image.png)

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 **were not properly received**. Keep reading to know how to resend the notifications.

#### 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  <a href="https://app.gitbook.com/s/VNE8t2FopKfzgQzTjlBb/deposits-api/manage-payments/get-deposit-status" class="button primary" data-icon="magnifying-glass">Get deposit status</a> endpoint.

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 Merchant Panel, locate the deposit (Transactions  :arrow\_right: Deposits) and click on the three dotted button under the <img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/2ssGtVBlPMG9ictFbW0B/image.png" alt="" data-size="line"> section and then "**Resend notification**"  to force a new notification to be sent.

![](https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/RGCMUtQnlyyZd9lcOIP2/image.png)

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