Step 3: Check and Confirm an Event Notification
The third step in setting up Grubtech webhooks is to make sure you receive event notifications and confirm they actually come from Grubtech.
Ensure You Receive the Notification
To check if you're getting event notifications, you can use either:
- A test endpoint that you create.
- A public service like webhook.site.
How to test using webhook.site:
- Open webhook.site in a browser, copy the unique URL it provides, and leave the page open.
- Follow the steps in mentioned above to create register the same in GT sandbox.Paste the unique URL from webhook.site as your notification URL.
- Trigger an event.Go back to webhook.site to check if the event notification appears.
- Once you've confirmed that your webhook subscription is working, you’ll need to write code at your notification URL to process the event data.
Confirm the Notification is from Grubtech
Because your notification URL is public, anyone could try sending fake notifications. To prevent this, you must verify that each event notification comes from Grubtech. However this is an optional step. Grubtech provides flexible authorization options for securing your webhook. You can choose from:
- None (No authentication)
- X-API Key
- Basic Authentication
- OAuth 2.0
Updated about 2 months ago