# Connect ticketing to your existing website (with code examples) — MijnEvent

  [Home](https://mijnevent.app/en) / [Blog for event organizers](https://mijnevent.app/en/blog) / Connect ticketing to your existing website (with code examples)   integration developers website embed api 

# Connect ticketing to your existing website (with code examples)

 Add MijnEvent as drop-in ticketing on your own site: one script line for the widget, four templates in your own branding that also drive your event pages, and a signed member token for member prices. Includes a PHP example.

 [Jasper Koers](https://mijnevent.app/en/author/jasper-koers) · 20 March 2026 · 4 min read 

  ![](https://regify-mijnevent.s3.eu-central-1.amazonaws.com/blog/covers/connect-ticketing-to-your-website.webp)  Photo: [Elijah Ekdahl](https://unsplash.com/@elijahekdahl?utm_source=MijnEvent&utm_medium=referral) / [Unsplash](https://unsplash.com/?utm_source=MijnEvent&utm_medium=referral)     In short

- MijnEvent runs as a drop-in on your own website: one script line plus a div renders the ticket widget, including checkout, without the visitor leaving your site.
- A signed member token — a short-lived HS256 JWT signed on your server — tells MijnEvent a buyer is a member, so the member price or free entry is applied automatically while non-members pay the regular rate.
- Nothing is synced or copied: your member administration stays the source of truth and the status is verified at the moment of purchase; an invalid or expired token simply treats the buyer as a paying non-member.
- Per ticket type you set access (Public or Members only) and an optional member price (empty, 0 for free, or a lower amount); MijnEvent re-verifies the token's signature, audience, expiry and single-use jti at display and checkout.
- In Branding → Embed studio you pick template, corner rounding and button style once; that choice drives the widget, your public event pages and your module storefronts, without the embed code changing.

  Already have a website for your association, sports club or organisation? Then you don't have to send visitors away to buy tickets. MijnEvent runs as a drop-in on your own site: you paste one script line and a `div`, and the ticket widget appears — including checkout, without the visitor leaving your site. The most powerful part is the **member connection**: because the member is already logged in on *your* website, that website can pass a signed token with each purchase that says "this is a member". MijnEvent then applies the member price or free entry automatically, while non-members pay the regular rate. Nothing is synchronised or copied — your member administration stays the source of truth and the status is always correct at the moment of purchase. Below we show how to apply it, with a working code example for developers. The step-by-step setup guide for admins is in the knowledge base article [Members free, non-members pay](/en/blog/members-free-non-members-pay).

# 1. The widget on your site (recommended: the script embed)

In your admin under **Integrations** the embed code is ready. The recommended option is one script line plus one `div` — the widget measures its own height and resizes the iframe automatically, so you don't have to guess a fixed height:

```html

```

You can place multiple events on a single page by adding multiple `div`s. There is also a simple `iframe` variant, but it requires you to set the height yourself (with long ticket lists or the checkout step the content then gets cut off) — only use that if you can't place a script.

# 2. The look: the embed studio

Your ticket shop should match your event, not the other way around. In **Branding → Embed studio** you choose organisation-wide how the widget looks, with a live preview of the real widget:

- **Template**: *Classic* (the familiar list), *Hero* (a large photo with your logo and the event title over the image), *Compact* (minimal, for sidebars and narrow spots) or *Steps* (step-by-step checkout with a progress indicator: tickets → details → overview → payment).
- **Theme**: light, dark or automatic (follows the visitor's system preference). For the dark theme you can upload a separate light logo variant.
- **Branding options**: show your logo, corner rounding (sharp/soft/round), button style (filled or outline — the button text colour is picked automatically for safe contrast), a transparent background so the widget blends into your site, and full width.

Your brand colours and fonts from **Branding** carry through everywhere — including success and error messages and even the confetti. The embed code itself doesn't change: saving the settings is enough, and every existing embed renders in the new style immediately.

## One choice drives your entire visitor-facing side

What you pick here isn't limited to the widget on your own site. The same template and theme also drive your **public event pages** on your MijnEvent subdomain and your **module storefronts** — rentals, shop, food, courses, memberships, donations and the rest. Pick *Hero* and your event page gets the same large photo header as your widget; pick *Compact* and everything turns tighter and narrower. So you don't choose again per surface, and a visitor clicking through from your own site to your event page doesn't suddenly see a different product.

That's why the preview switches along: you can preview the widget, a real event page or a module storefront, including colours you haven't saved yet.

## The seller is stated clearly

Below the widget and below your public pages there's a short seller notice: *"You're buying tickets from {your organisation} — not from MijnEvent"*, together with your legal seller details (email, phone, address, chamber of commerce and VAT number). MijnEvent provides the platform and handles the payment; you remain the seller, responsible for the event, cancellations and refunds. The wording adapts to the surface — renting, ordering, booking or donating instead of buying. You don't have to do anything for it; it appears automatically, including inside the embed on your own site.

# 3. A member price or members-only ticket type

For a ticket type you set two things in the admin:

- **Access**: *Public* or *Members only* (members-only ticket types are hidden from the public).
- **Member price**: empty (members pay normal), `0` (free for members) or a lower amount (member discount).

# 4. The member token (for developers)

When a logged-in member buys tickets on your site, your **server** signs a short-lived [JWT](https://jwt.io) with the secret key from **Integrations**. It's a plain HS256 token; you don't need a library for it:

```php
