# Webhooks

### Overview

2Checkout generates automatic notifications for transaction and subscription/license change events, which it sends to a location on your server that you control. You can perform backend tasks, including provisioning, entitlement, customer and subscription lifecycle management, and more by using 2Checkout’s IPNs, LCNs, and API message services on your server.

| Webhook                                                                                                            | Use for the following events                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [Instant Payment Notifications (IPN)](/2checkout-apis/2checkout-apis/webhooks/instant-payment-notification-ipn.md) | <p>Purchase and transactions events:<br>- Authorized payments<br>- Finalized payments<br>- Refunds<br>- Chargebacks<br>- Creating customers</p> |
| [License Change Notifications (LCN)](/2checkout-apis/2checkout-apis/webhooks/license-change-notification-lcn.md)   | <p>Subscription events:<br>- Renewal<br>- Expiration<br>- Upgrade<br>- End user info updates</p>                                                |

### Workflow

2Checkout’s webhooks (IPN and LCN) operate **asynchronously**.

![webhooks1.png](/files/9a04e7ea3634de534be15c5cf23a9075ae991bd2)

### Hash signature calculation

Depending on your shoppers' location, addresses and billing names may contain special characters.

For UTF-8 characters, the length in bytes can be longer than the string length. When calculating the hash signature, we highly recommend using multibyte methods that return the number of bytes in a string, instead of methods that return the number of characters. For example, if using PHP, use the strlen method instead of length.

### Failing Webhooks Alerts

You can configure alerts for IPN and LCN failing webhooks from your Merchant Control Panel by following these steps:

{% stepper %}
{% step %}

### Log in to your Merchant Control Panel

Open: <https://secure.2checkout.com/cpanel>
{% endstep %}

{% step %}

### Navigate to Webhooks & API

Scroll down to the **Notifications** section.

![Failing webhooks 1.png](/files/98474e4b67a75ec6a9f020cccab7f7c237ecd0ea)
{% endstep %}

{% step %}

### Enable failing webhooks alerts

Select the **Failing webhooks alerts** checkbox.

![Failing webhooks 2.png](/files/de32a3aa184079b2d7cc40774dfcd99cb37a5bff)
{% endstep %}

{% step %}

### Choose frequency and threshold

Select the frequency (receive an email every X hours) for which you want to be alerted and the threshold of failing IPNs/LCNs webhooks.\
Example: the platform will send an email every 4h when more than 25% of the IPNs are failing.

![Failing webhooks 3.png](/files/0fde4686be8925910110e639e39fc409edc40652)

The alert will be sent to the email address filled out in the **Technical notifications email** field under *Account settings → Account information* in your Merchant Control Panel. If the 'Technical notifications email' is not filled out, you will not be able to configure the email alert for the failing webhooks.
{% endstep %}
{% endstepper %}

#### Related pages

* [IPN and LCN URL Settings](/2checkout-apis/2checkout-apis/webhooks/ipn-and-lcn-url-settings.md)
* [Webhooks upgrade to the SHA algorithm](https://verifone.cloud/docs/2checkout/API-Integration/01Start-using-the-2Checkout-API/2Checkout-API-general-information/Migration_guide_SHA2_SHA3/Webhooks_upgrade_to_the_SHA_algorithm)
* [Start using the 2Checkout API](https://verifone.cloud/docs/2checkout/API-Integration/01Start-using-the-2Checkout-API)


---

# 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.2checkout.com/2checkout-apis/2checkout-apis/webhooks.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.
