# Managing your Webhooks

In this article we will discuss webhooks for MessageBird's Abandoned Cart Recovery Solution. We will cover the following topics:

* [Why do you need webhooks?](#h_01F7X6NM281EYDPM0KYBF8SDSV)
* [Anatomy of Webhooks](#h_01F7X6NSMFAGJ3YM7YSE32AME4)
* [Verifying Webhooks](#h_01F7X6NX9D5FW2V3TH3362BY7B)
* [Creating Webhooks](#h_01F7X6P19M083T2QCTTFC5QGSP)
  * [Step 1: Create webhook](#h_01F7X6W85R3BR3VSQ601DHZZNG)
  * [Step 2: Test your webhook](#h_01F7X6WD1422ZXSDYS2B6T9BJG)

#### Why do you need webhooks? <a href="#h_01f7x6nm281eydpm0kybf8sdsv" id="h_01f7x6nm281eydpm0kybf8sdsv"></a>

You might wonder why you need to set up webhooks in the Shopify Admin Dashboard for MessageBird’s Abandoned Cart Recovery Solution to work. We need the webhooks to receive events, successfully handle abandoned checkout detection, efficiently manage audience engagement, and enable users to specify an audience.

&#x20;

#### Anatomy of Webhooks <a href="#h_01f7x6nsmfagj3ym7yse32ame4" id="h_01f7x6nsmfagj3ym7yse32ame4"></a>

You can use webhook subscriptions to send notifications about particular events in your online shop to MessageBird. The E-commerce solutions you've set up on the MessageBird platform will be able to work with the incoming data and send messages across any communication channel. Each solution may rely on a different set of events, and these webhooks only need to be configured once. For Abandoned Checkout Recovery, MessageBird monitors checkout events.&#x20;

&#x20;

#### Verifying Webhooks <a href="#h_01f7x6nx9d5fw2v3th3362by7b" id="h_01f7x6nx9d5fw2v3th3362by7b"></a>

Webhook events sent from Shopify are signed with a verification key. To ensure security, our platform will validate the incoming event. To do so, we need you to copy the key generated for your solution in the Shopify Admin. You can find this key by following the next steps:

1. Log in to your Shopify Admin
2. Go to **Settings** and tap **Notifications**
3. Scroll down to the bottom of the page and copy the key. In the image below the key is blurred for security, but yours won’t be :)

<figure><img src="https://675349995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUJNEE9TMK4fU91VKstBr%2Fuploads%2Fgit-blob-d22baf2b2409b22b71f00df3b5ac2bee17c21b71%2Fwebhooks_image1.png?alt=media" alt=""><figcaption></figcaption></figure>

Check out [this guide](https://shopify.dev/tutorials/manage-webhooks#verify-webhook) to learn more about how MessageBird ensures security by verifying incoming webhooks from Shopify. &#x20;

&#x20;

#### Creating Webhooks <a href="#h_01f7x6p19m083t2qcttfc5qgsp" id="h_01f7x6p19m083t2qcttfc5qgsp"></a>

Shopify allows you to create webhooks for a single topic. To create a webbook, check out Shopify's user documentation on [how to create webhooks on Shopify Admin](https://help.shopify.com/en/manual/sell-online/notifications/webhooks) or follow these steps:&#x20;

&#x20;

**Step 1: Create webhook**

Go to the Shopify Admin, click **Settings** and tap **Notifications**. Scroll to the bottom to the **Webhooks section**, and hit **Create webhook**.

Enter the **Event**, **Format**, **URL** and **Webhook API version**. Tap **Save webhook** when you’re finished.&#x20;

For Abandoned Checkout Recovery, you will need to send Checkout Creation and Checkout Update to MessageBird. Here's how your Webhook setup should look like :&#x20;

* Event: Checkout Creation
* Format: JSON
* URL: <https://solutions.messagebird.com/webhooks/checkouts/shopify>
* Webhook API version: 2020-01 (Latest)

<figure><img src="https://675349995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUJNEE9TMK4fU91VKstBr%2Fuploads%2Fgit-blob-8c72ec9a06174ca405f21b8dec18c0c827ca7098%2Fwebhooks_image2.png?alt=media" alt=""><figcaption></figcaption></figure>

Done? Awesome! Now create another one with the event **Checkout Update**.

* Event: Checkout Update
* Format: JSON
* URL: <https://solutions.messagebird.com/webhooks/checkouts/shopify>
* Webhook API version: 2020-01 (Latest)

&#x20;

**Step 2: Test your webhook**

After the webhook is created, you’ll be redirected to the **Notifications** page, where you can send a test webhook—the testing actually sends a sample event to MessageBird. We’ll use the test to verify that the webhook setup is connected as expected and if not, you’ll receive an error response.&#x20;

And that’s it! Now you know how to create a webhook on the Shopify Admin API.

Need extra help? Contact our [Support team](https://support.messagebird.com/hc/en-us/requests/new). We’re here for you.

#### &#x20;

&#x20;
