# Discord Webhooks

## What's a Discord Webhook?

Discord features a function called Webhooks which allows Hayha to send important notifications to a Discord channel such as successful checkouts, failed checkouts, and checkout links.&#x20;

![Example of a successful checkout notification being sent through Discord Webhook.](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FeeaBi8y2qPKsWAoY4u9Z%2Fimage.png?alt=media\&token=5e9ceddf-64d0-4565-a17e-a1eb1c1e7688)

## How to setup a Discord Webhook?

We recommend setting up your Discord Webhook in a private/personal server where no else can see the information but you. Webhooks can contain sensitive information so it's a good practice to keep this information private.&#x20;

## How to make your own server?&#x20;

**1.** Click the **"+"** button on the left hand column.

![Step 1: Add a server.](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FbTFKgP1iGc7hbLsxAV7t%2Fimage.png?alt=media\&token=37ac6d8b-ea24-485c-86bf-d5ef0b154c4d)

**2.** After clicking on the **"+"** symbol a pop up will appear. Select "Create a server".

![Step 2: Create a server.](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FIXy16BOm0J8cYIWJLdLu%2Fimage.png?alt=media\&token=250a8e1b-111e-4839-94d3-569652a597cb)

**3.** You can enter in the server name and change the server icon. After you're done customizing your server press create.&#x20;

![Step 3: Customize your server and create it.](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2F6Jiqb06k7T6B0pk7bKkE%2Fimage.png?alt=media\&token=223f1a9a-9af4-4786-b56d-5ff5f12f3912)

![Successful creation of a Discord Server. ](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FwUBetjzx9Dl2YLN0yWDS%2Fimage.png?alt=media\&token=addc1114-f432-4967-ab9a-6b81b67dd0f2)

Congratulations you have successfully setup a Discord Server.&#x20;

## Creating a Discord Webhook

**1.** Open your **Discord Server** and click the Gear Icon (Edit Channel) of the channel you want to post to.

![Step 1: Edit Channel](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FwggmzbhE8xHksERF6q1v%2Fimage.png?alt=media\&token=5bc418e3-170d-4a23-a8a3-3f895b48289c)

**2.** Click on the **"Integrations"** tab **and select "Webhooks".**&#x20;

![Step 2: Creating a webhook](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2F6Vv6LAp3CFsI8pVxQ4dL%2Fimage.png?alt=media\&token=f6bf254a-fac4-4a59-8a6b-b15594379592)

**3.** Name your Webhook and hit the button **"Save Changes"** and click on **"Copy Webhook URL"**.

![Step 3: Name and Copy the Webhook URL.](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FcKeItZuWK0J3utd5js0V%2Fimage.png?alt=media\&token=ac67cc6e-c345-4441-8965-a4f1dfb7e801)

**4.** After you click on **"Copy Webhook URL"** it will copy the Webhook link, you will then go into the **"Settings"** tab in-bot then paste the Webhook link into the desired sections and press **"Save Webhook"** to complete setting up.&#x20;

**Success Webhook:** This Webhook will send a Discord notification of successful checkouts to the desired Discord channel.

**Failure Webhook:** This Webhook will send a Discord notifications of failed checkouts to the desired Discord channel.&#x20;

**Miscellaneous Webhook:** This Webhook is used for notifications such as splash passes.&#x20;

<figure><img src="https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FqpNXNUBbQHhKd6oYbcey%2Fimage.png?alt=media&#x26;token=bfb9db2b-689f-49e5-bc53-649fcd4946cd" alt=""><figcaption><p><strong>Step 4:</strong> Copy and paste the Discord Webhook URL and press "Save Webhook".</p></figcaption></figure>

**5.** Test your Discord Webhook by pressing the "Test" button.

![](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FGdo7clDaA7pp4Ybcrb71%2Fimage.png?alt=media\&token=7534e0f3-b255-4d08-a580-060f26f6f1e3)

If successful you will see the message below in the Discord channel you assigned the Webhook to.&#x20;

![](https://868374352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsa9hO1wAdcCxan5eSRkU%2Fuploads%2FZ3PET0ZxQz8maUZHL1JK%2Fimage.png?alt=media\&token=49bd3d72-a1af-4963-ae30-24fbb1d84518)
