# Get a webhook each time you take a ticket order | Ticket Fairy-guider

1. [Ticket Fairy](https://www.ticketfairy.com/)
2. [Guider](https://www.ticketfairy.com/sv/guides)
3. Get a webhook each time you take a ticket order

Utvecklare och API:et

# Get a webhook each time you take a ticket order

A webhook posts every order to an address you own, seconds after the buyer pays. Agencies and promoters with their own CRM, warehouse or fulfilment system get each sale as it happens, rather than waiting for a nightly export.

Have Ticket Fairy send each new order to an address you own, seconds after the buyer pays, so your own systems get the sale without asking for it on a timer.

För:  Sending each ticket sale to your own systems as it happens

Tar:  8 minuter

- [Generate the webhook key](#step-1)
- [Point a webhook at your own address](#step-2)
- [Choose what sets it off](#step-3)
- [When to put a webhook on the brand rather than the event](#step-4)
- [Attach it where it should listen](#step-5)
- [Sell a ticket and watch it arrive](#step-6)

## Innan du börjar

- You have an address that answers a POST and returns quickly. Use HTTPS for a real endpoint, because each request carries order and buyer details.
- You have a personal access token for the command line. Creating one has its own guide.
- You know which events should feed it: one event, everything under a brand, or everything on a tour.

1. ## Generate the webhook key

   Open your account settings and select **Generate Webhook API Key** under **Webhook API Key**.

   **Obs:** Platforms such as Zapier ask for this key when you connect them. A webhook you create yourself calls your address directly and needs nothing from this card.
          ![Ticket Fairy Webhook API Key card showing the key with a control to copy it and one to regenerate it](https://www.ticketfairy.com/embeds/posters/marketing-developer-access--api-keys.png)    The webhook key, once it has been generated.
2. ## Point a webhook at your own address

   Run "ticketfairy webhook create --url https://example.com/hooks/tickets --on order" against the brand you are working on.

   **Obs:** Each order is posted to that address as JSON. Answer with a success code quickly and do the slow work afterwards, so a busy on-sale never waits on you.
3. ## Choose what sets it off

   Pass the one thing you want to hear about in "--on": "order" for orders, or "new\_event", "update\_event", "publish\_event" and "find\_event" for the event itself.

   **Obs:** One webhook carries one notification, so a system that wants orders and publications needs two of them.

## When to put a webhook on the brand rather than the event

Attach a webhook to one event when only that event should feed your system, and to the brand when every event should. A whole tour has its own attachment. The four event notifications are the exception that decides it for you: "new\_event", "update\_event", "publish\_event" and "find\_event" reach brand and tour webhooks only, and never one attached to a single event, so a system that wants to hear about publications needs its webhook on the brand.

4. ## Attach it where it should listen

   Pass "--event", "--brand" or "--tour" on the command that creates it.

   **Obs:** The command falls back to the brand you are working on when none of the three is given.
5. ## Sell a ticket and watch it arrive

   Buy one ticket yourself and check the request reaches your address.

   **Obs:** Delivery happens in the background rather than inside the checkout, so allow a few seconds. Refund your own order afterwards.

## Prova de här stegen på ditt eget evenemang

Skapa ett gratis konto, bygg ditt evenemang och följ stegen ovan i din egen instrumentpanel. Det tar några minuter och du behöver inte boka något säljsamtal.

    Din e-postadress    [Skapa ett gratiskonto](https://manage.ticketfairy.com/welcome) [Boka en demo](https://www.ticketfairy.com/sv/event-ticketing/book-a-demo)

Inga startavgifter. Ingen obligatorisk månadsavgift. Inget kreditkort krävs.

## Eller låt det göras åt dig

Fai can open the page holding the webhook key. The webhooks themselves are created from the command line, and the steps below show the commands.

### I din instrumentpanel, med Fai

Open my account settings so I can get my webhook key

### Från din egen assistent, via MCP

Anslut assistenten till [vår MCP-server](https://www.ticketfairy.com/mcp-server) och be den:

Behåll `--read-only` i MCP-konfigurationen. Den här uppgiften läser bara data, så assistenten behöver inga verktyg som gör ändringar.

Pick the brand \<BRAND NAME\> and show its events

## Från din terminal

Installera CLI:t från [vår CLI-sida](https://www.ticketfairy.com/cli), logga in med `ticketfairy auth login` och välj varumärket du arbetar med via `ticketfairy brand use <BRAND_ID>`. `ticketfairy brand list` och `ticketfairy event list` visar de ID:n som de andra kommandona använder.

Create the webhook, then read back what is listening.

### Call your address every time an order is placed

ticketfairy webhook create --url https://example.com/hooks/tickets --on order

### Show the webhooks on the active brand

ticketfairy webhook list

## Låt Fai göra det åt dig

Fai arbetar inuti din Ticket Fairy-instrumentpanel. Skapa ditt konto, öppna Fai och klistra in instruktionen ovan.

   [Skapa ett gratiskonto](https://manage.ticketfairy.com/welcome) [Boka en demo](https://www.ticketfairy.com/sv/event-ticketing/book-a-demo)

Inga startavgifter. Ingen obligatorisk månadsavgift. Inget kreditkort krävs.

## Take one out of service

1. ### Switch it off while you work on your end

   Run "ticketfairy webhook update \<ID\> --disable", taking the id from "ticketfairy webhook list".

   **Obs:** A disabled webhook keeps its settings and stops receiving. Bring it back with the same command and "--enable".
2. ### Remove one you have finished with

   Run "ticketfairy webhook delete \<ID\>" once nothing needs it.

   **Obs:** Deleting is permanent, so disable first when you only want a pause.

Fai can open the dashboard for you. Webhooks are read and changed from the command line today.

### I din instrumentpanel, med Fai

Open my account settings

### Från din egen assistent, via MCP

Behåll `--read-only` i MCP-konfigurationen. Den här uppgiften läser bara data, så assistenten behöver inga verktyg som gör ändringar.

Pick the brand \<BRAND NAME\> and show its events

### Från din terminal

Read the webhooks, then switch one off or remove it.

#### Show the webhooks on the active brand

ticketfairy webhook list

#### Stop a webhook receiving without deleting it

ticketfairy webhook update \<WEBHOOK\_ID\> --disable

#### Remove a webhook permanently

ticketfairy webhook delete \<WEBHOOK\_ID\>

## Frågor du kanske har

Why did nothing arrive when my event went live?:  Check what the webhook is attached to. The event notifications reach brand and tour webhooks only, so one attached to a single event hears about orders alone.

What happens when my address is down?:  That delivery fails and the next one is tried as normal. Answer 410 Gone and we take the webhook off the list, which is the clean way to unsubscribe from your end.

Can I check a request really came from Ticket Fairy?:  Yes. Ask Ticket Fairy support to add a signing secret to your event, and every request then carries an X-Signature header your endpoint recomputes with the same secret.

Will the same order reach me more than once?:  Yes. The whole order is posted again every time it changes, so a refund, a cancellation, a resale or a transfer each send it. Match on the order number and apply what you receive, rather than counting every delivery as a new sale.

Can I test against a local address?:  A plain http address on your own machine is accepted, so a tunnel is a convenience rather than a requirement. Every request carries order and buyer details, so keep http for testing and give the live system an HTTPS address.

## Har du fortfarande en fråga?

Boka en demo så svarar vi på den i ett samtal, utifrån din typ av evenemang. Eller skapa ditt konto och se själv.

   [Boka en demo](https://www.ticketfairy.com/sv/event-ticketing/book-a-demo) [Skapa ett gratiskonto](https://manage.ticketfairy.com/welcome)

Inga startavgifter. Ingen obligatorisk månadsavgift. Inget kreditkort krävs.

## Relaterade guider

- [Fler sätt att använda Ticket Fairy](https://www.ticketfairy.com/sv/event-ticketing/features)
- [Create an API key so your own tools can read your ticket sales](https://www.ticketfairy.com/sv/guides/create-an-api-key-for-your-own-app)
- [Can you sell tickets directly from your own website?](https://www.ticketfairy.com/sv/guides/sell-tickets-on-your-own-website)
- [Sync your ticket buyers to Mailchimp](https://www.ticketfairy.com/sv/guides/sync-buyers-to-mailchimp)
- [Alla Ticket Fairy-guider](https://www.ticketfairy.com/sv/guides)

## Gör det på ditt eget evenemang

Skapa ditt konto, bygg evenemanget och följ stegen i din egen kontrollpanel. Du behöver inte boka ett säljsamtal.

  [Skapa ett gratiskonto](https://manage.ticketfairy.com/welcome) [Boka en demo](https://www.ticketfairy.com/sv/event-ticketing/book-a-demo)

## Sälj biljetter med Ticket Fairy

Allt i de här guiderna finns i din instrumentpanel från den dag du registrerar dig.

- Sätt upp ditt evenemang på några minuter
- Gratisevenemang är gratis
- Fai, din medpilot, är inbyggd

 [Skapa ett gratiskonto](https://manage.ticketfairy.com/welcome)

Inga startavgifter. Ingen obligatorisk månadsavgift. Inget kreditkort krävs.

## Se det i ett samtal

Boka en demo så visar vi hur Ticket Fairy hanterar din typ av evenemang.

 [Boka en demo](https://www.ticketfairy.com/sv/event-ticketing/book-a-demo) [Fler sätt att använda Ticket Fairy](https://www.ticketfairy.com/sv/event-ticketing/features)

### Tips för att sälja fler biljetter

Praktiska råd från arrangörer som säljer slut, och varje ny guide så snart den publiceras.

Vi respekterar din integritet. Avsluta när du vill.
