# Global Webhooks Configuration

After [accessing](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/..#how-to-access-webhooks-configuration) the Webhook Configuration section, the first tab you’ll encounter is **General**. In this section, merchants can configure their webhook settings according to their preferences by completing the fields below.

<figure><img src="https://content.gitbook.com/content/uvuyQluEi5QMHcp2TcU7/blobs/3rRGxohm9aIHBYtHcqBK/image.png" alt=""><figcaption></figcaption></figure>

## **Parameters Description:**

* #### **HMAC key:**&#x20;

  This key is used to generate signatures.
* #### **Ignore SSL:**&#x20;

  If checked, the SSL certificate will not be verified when calling the webhook URL.
* #### **Notify on Error:**&#x20;

  If checked, an email will be sent if an error occurs while calling the webhook URL.
* #### **Email List:**&#x20;

  Specify the list of email addresses where the webhook URL error notification should be sent.
* #### **Timeout:**&#x20;

  The amount of time that the Ottu server will wait for a response from the merchant server.
* #### **Retries:**&#x20;

  The number of retry attempts the Ottu server will make to resend the request to the merchant server if the first attempt fails. Note that the **Enable retry webhook mechanism** option should be checked to activate this feature.
* #### **Backoff factor:**&#x20;

  The amount of time the Ottu server will wait before retrying the request (i.e., the time between two attempts).

***

### [Enhanced Scenario: Managing Server Downtime with Retry Logic](#enhanced-scenario-managing-server-downtime-with-retry-logic)

Consider a scenario in which the merchant’s server experiences a temporary downtime lasting 30 seconds. With a timeout duration of 20 seconds, a retry limit set at 3 attempts, and a backoff factor of 5 seconds, the following sequence of events will unfold:

**Key Details to Remember**:

* The merchant’s server will take a total of 30 seconds to become responsive.
* The retry mechanism allows for 3 attempts in total.

<figure><img src="https://697689627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuvuyQluEi5QMHcp2TcU7%2Fuploads%2F9J3rYVW99KYhLfnUKRJT%2Fimage.png?alt=media&#x26;token=551b53e8-b189-4d81-ad09-dc8dbc2db0d7" alt=""><figcaption></figcaption></figure>

**First Attempt**:

* Ottu's server initiates a request to the merchant's server.
* Ottu's server waits for up to 20 seconds for a response (configured timeout = 20 seconds). Since the merchant’s server is still down, this attempt will fail due to timeout.
* Ottu's server pauses for 5 seconds before the next attempt (backoff factor = 5 seconds).

**Time Elapsed After First Attempt**: 25 seconds (20 seconds waiting + 5 seconds backoff).

**Second Attempt**:

* Ottu's server makes a second request to the merchant’s server.
* As the 5-second backoff has completed, and the server downtime (30 seconds) has passed, the merchant's server is now responsive.
* This second request succeeds, completing the process successfully.

This scenario illustrates how the retry logic with defined timeouts and a backoff factor ensures resilience during temporary server unavailability, helping to mitigate potential disruptions in the payment process.

***

* #### **Version:**&#x20;

  The version of the webhook API.
* **Enable retry webhook mechanism?**\
  If checked, the retry webhook mechanism becomes operational, permitting Ottu to make multiple attempts to reach the webhook URL if a timeout occurs. If this feature is disabled, no further retries will occur, which could lead to some webhook calls being missed.
* #### **Enable webhook notifications:**&#x20;

  If checked, webhook notifications will be activated.

***

### [**Redirect behavior:** ](#redirect-behavior)

The redirect behavior is determined by the [webhook URL](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/broken-reference) response to payment events and payment operations.

<figure><img src="https://697689627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuvuyQluEi5QMHcp2TcU7%2Fuploads%2FaFY3OClemab6LEiR9Op6%2Fimage.png?alt=media&#x26;token=3df0066c-340e-4a71-a259-5913af7f5aa8" alt=""><figcaption></figcaption></figure>

* If the webhook URL returns a status code of 200, the customer will be redirected to the [redirect\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/broken-reference).
* If the webhook URL returns a status code of 201, the customer will be redirected to the **Ottu payment summary page**.
* If the webhook URL returns any other status code, the customer will be redirected to the **Ottu payment summary page**. \
  In this case, Ottu can send an email notification if the **Enable webhook notifications** option is checked.

***

* #### **Enable retry webhook mechanism**:

  If checked, Ottu will retry the request if the first attempt fails. See the [Example](#example-scenario-handling-server-downtime-with-retry-logic) above for further clarity.
* #### **Operations webhook\_url:**&#x20;

  The URL where transaction data will be disclosed once an operation transaction flow is triggered. See [Operation Webhook Notification](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/..#operation-webhook-notification).

{% hint style="info" %}
If both the [Operation webhook\_url](#operations-webhook_url) in the [Global Webhooks Configuration](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/global-webhooks-configuration) and the [Webhook URL](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhook-plugin-configurations#webhook-url) in the [Webhook Plugin Configurations](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/webhook-plugin-configurations) are provided simultaneously, the system will transmit data to both URLs.
{% endhint %}

* #### **Enable webhook notifications if transaction initiated from API:**&#x20;

  If checked, [Payment Webhooks](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/configuration/webhooks-configuration/..#payment-webhook-notification) will be activated even if the transaction is created via the API.
