Skip to content
MyTicket

Developer resources

Build ticketing into any website.

Everything you need to plan a MyTicket integration: the embed widget, the WordPress plugin and the design of our REST API and webhooks.

Preview documentation. Code on this page is illustrative and shows the intended design. The widget script, plugin, API endpoints and webhooks are not live yet, and details may change before launch.

Integration overview

At launch

MyTicket offers three ways to sell tickets. All of them use the same ticketing engine, so inventory, orders and tickets stay in sync whichever channel a buyer uses.

Universal embed

A small script displays the ticket shop inside any web page, inline or as a pop-up.

At launch

Hosted checkout

Every published event gets a fast, shareable event page and checkout on MyTicket.

At launch

Developer API

Build a fully custom ticket-buying experience on the same engine.

Planned

The checkout always runs on MyTicket's own secure domain inside a sandboxed frame. Your page never handles buyer payment details, and host-page CSS can't break the checkout.

Widget integration

At launch

Paste the snippet where the ticket shop should appear. The link inside the placeholder is a fallback: it still works if JavaScript is blocked, and the widget replaces it once loaded. Use your event code from the dashboard's Share tab.

htmlInline shop
<div class="myticket-shop" data-event="E7K3Q9XP">
  <a href="https://tix.myticket.co.zw/e/E7K3Q9XP">Buy tickets</a>
</div>
<script async src="https://js.myticket.co.zw/v1/widget.js"></script>
htmlButton that opens a pop-up shop
<button class="myticket-button" data-event="E7K3Q9XP" data-mode="button">
  Get tickets
</button>
<script async src="https://js.myticket.co.zw/v1/widget.js"></script>
Widget configuration attributes
AttributePurpose
data-eventRequired. Your public event code.
data-modeinline (default) or button for a pop-up.
data-themelight, dark or auto.
data-accentBrand colour as a hex value; contrast is checked automatically.
data-ticket-typePre-select a ticket type, e.g. VIP.
data-hide-headerHide the event banner if your page already shows it.

Content Security Policy: if your site sets a CSP, allow js.myticket.co.zw in script-src and tix.myticket.co.zw in frame-src.

jsOptional: listen for completed orders (no personal data is shared)
document.querySelector(".myticket-shop")
  .addEventListener("myticket:order_completed", (e) => {
    const { order_ref, total_minor, currency, ticket_count } = e.detail;
    // e.g. send a conversion event to your analytics
  });

WordPress integration

At launch

The official MyTicket plugin adds a shortcode, a Gutenberg block and an Elementor widget. Until it's published, the HTML snippet above works in any Custom HTML block or Elementor HTML widget.

textShortcode
[myticket event="E7K3Q9XP" mode="inline"]
  • Loads the widget only on pages that use it.
  • Compatible with common caching plugins: no API keys are stored in WordPress for the embed.
  • Plugin directory listing planned after the pilot phase.

REST API overview

Planned

The API follows REST conventions: JSON over HTTPS, versioned paths (/v1), cursor pagination, idempotency keys on every write that matters, and consistent error objects. It's the same API our own ticket shop uses.

bashRead a published event (illustrative, not yet live)
curl https://api.myticket.co.zw/v1/public/events/E7K3Q9XP \
  -H "X-MyTicket-Key: pk_live_your_publishable_key"
jsonResponse (abridged)
{
  "event_code": "E7K3Q9XP",
  "title": "Sunday Social",
  "starts_at": "2026-12-13T09:00:00Z",
  "timezone": "Africa/Harare",
  "ticket_types": [
    { "code": "GA",  "name": "General Admission", "price": { "amount_minor": 1000, "currency": "USD" }, "availability": "available" },
    { "code": "VIP", "name": "VIP",               "price": { "amount_minor": 2500, "currency": "USD" }, "availability": "low" }
  ]
}

Planned resource groups: events, ticket types, inventory, checkout sessions, orders, tickets, attendees, reports and webhooks. Tickets are only ever issued after the payment has been confirmed server-side. The API can't be used to bypass payment.

Authentication overview

Planned
Publishable keys

Prefixed pk_. Safe in browsers. Read public event data and create checkouts only.

Secret keys

Prefixed sk_. Server-to-server only, never in client code. Scoped, revocable and shown once at creation.

bashList orders for an organisation (illustrative)
curl https://api.myticket.co.zw/v1/orgs/{org_id}/orders?limit=50 \
  -H "Authorization: Bearer sk_live_your_secret_key"

Webhooks overview

Planned

Receive signed HTTPS notifications when things happen: order.paid, order.refunded, ticket.checked_in, event.updated and more. Each delivery carries a stable event ID for de-duplication and is retried with backoff for up to 24 hours.

tsVerify a webhook signature (Node.js, illustrative)
import crypto from "node:crypto";

export function verifyMyTicketWebhook(rawBody: string, headers: Headers, secret: string) {
  const timestamp = headers.get("MyTicket-Timestamp") ?? "";
  const signature = (headers.get("MyTicket-Signature") ?? "").replace(/^v1=/, "");
  const expected = crypto.createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
  return fresh && signature.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}

QR ticket secrets are never included in webhook payloads.

Want sandbox access when it opens?

Tell us what you're building and we'll reach out.

Contact the developer team →
Last updated with the pre-launch API design

Building for an organiser?

Partner with us to deliver ticketing your clients will love.