# Send data to your server using Webhooks

You can send student registration and course purchase data from your Course.link
website directly to your server or any third-party application using Webhooks.



Whenever a user registers in your academy or purchases a course, Course.link
automatically sends the event data to the webhook URL you have configured.



Note
Webhooks are slightly technical. If you are not familiar with APIs or server
endpoints, it’s recommended to get help from a developer on your team.


WHAT IS A WEBHOOK?

A webhook is an automatic notification sent over the internet when a specific
event occurs.

In Course.link, events like:

 * A new user registration

 * A course purchase

trigger a webhook.



When this happens, Course.link sends the details to the Webhook URL that you
have provided. The webhook is always sent as an HTTP request.


SETTING UP

Setting up a webhook is simple:

 * You need an API endpoint on your server or third-party app that can accept
   POST requests with JSON data.

 * Simply paste the Webhook URL and Course.link will send the details to it
   automatically.

In your Course.link dashboard, go to Settings → Integrations you will find the
Webhooks option. Click on Connect.





Enter the Webhook URL that points to your API end point. This is where
Course.link should send the event details.



Example: https://yourdomain.com/webhooks/orders





Click on Save.






TEST YOUR WEBHOOK

Click Settings under Webhook, select Test Webhook, and choose an event to verify
that the request reaches your server.





Note

To test easily, you can also use free tools like Webhook.site
[http://Webhook.site] or Intercept.rest [http://Intercept.rest] to see if
Course.link website is sending the data.



If the test works, congrats! Your webhook is now active.



From now on, every time a user registers or purchases a course, Course.link
[http://Course.link]will automatically send the event details to your configured
webhook URL.


WHY YOU MAY RECEIVE TWO WEBHOOKS

If a student registers and then purchases a course, you will receive two
separate webhook events.



You can distinguish them using the type field in the JSON payload:



For Customer Registration

"type": "customer_registered"

This webhook includes:

 * Customer name

 * Email address

 * Phone number

For Course Purchase

"type": "purchase"

This webhook includes:

 * Customer name

 * Email address

 * Phone number

 * Course title

 * Course ID

 * Amount paid

 * Payment ID

 * Currency

You can tell them apart by checking the type field and setting up your workflow
to handle each event accordingly.


COURSE.LINK WEBHOOK INTEGRATION EXAMPLES

 * How to connect Course Website to Google Sheets using Zapier
   [https://course.link/help/article/1053-how-to-connect-course-website-to-google-sheets-using-zapier]