Sell tickets on your own website without redirecting buyers to universe.com. Our embeddable widgets work on most websites include
Advanced Feature: This feature is recommended for advanced users only and requires coding.
What is a webhook?
A webhook is a way for an app to provide other apps with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. This is different from a typical API, where you need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient, and in most cases, a better option.
When should I use a webhook?
If you want to send data every time a new ticket is purchased on Universe to your server or another application that isn't supported through our Zapier Integration, then you should use a webhook.
When shouldn't I use a webhook and should use the API instead?
If you only want data to be sent when you initiate the request, and you want to limit to only receiving a smaller subset of the data.
What do I need to use a webhook?
In order to use a webhook, you will need to have something that will be able to consume the webhook. So you will need to be able to write some code or get help from someone who does.
What do I need to know about a Universe webhook?
Whenever a ticket is purchased, we will send a JSON
- encoded HTTP POST
request to the provided Payload URL with the following headers:
X-Uniiverse-Event - Event Type
X-Uniiverse-Signature - HMAC hex digest of the payload, using the hook's secret as the key (if configured).
The body of the request will be a JSON
- encoded representation of the data.
Getting Started:
1. Set up the webhook
Navigate to 'Settings' in your Universe account.
2. In the 'account tab', scroll down to the webhooks Section and click 'add webhook'
3. Configure the Webhook
To configure the Webhook, you will need to populate the following fields:
URL: This will be the URL of your webservice, or whatever you have set up to consume the POST request.
Tip: If you just want to test it out, you can sue a RequestBin URL (from https://requestbin.com/) as a place to temporarily send the Universe Data and examine the data format.
Secret: A secret is like a password used between Universe and your app, to keep other apps from accessing your data.
Active: You must check this box if you want to activate the webhook. You can enable and disable your webhook at any time.
4. Write code to consume the data
Every time a new ticket is purchased, Universe will send all the data you will need associated with the event and the purchase to populate in your app.
You can see a sample request containing all the data we send here.
You can find an explanation of each object at http://developers.universe.com
Events
Currently, there are two events that trigger a webhook:
ticket_purchase
- Any time you purchase a ticket, or a ticket is purchased for one of your listings.
ticket_update
– Any time the ticket state changes (i.e., from paid to cancelled, etc.,).
Note: these events share the same data payload.
Troubleshooting
If for some reason the POST request to the Payload URL fails, the webhook will be marked as inactive, and you'll have to re-enable it from your user settings.