Vihaya Logo
Vihaya Events
Pricing
Sign in
Developers/GitHub Copilot

Guide · GitHub Copilot

Build an event ticketing site with GitHub Copilot

Last updated 4 October 2026

To build an event ticketing site with GitHub Copilot, let GitHub Copilot write the front end and use the Vihaya Events API as the backend. Vihaya handles payment, QR tickets, ticket emails and payouts. Connect the Vihaya MCP server too, and GitHub Copilot can create and publish your events for you.

Key facts

  • GitHub Copilot can build a complete ticketing site on the Vihaya Events API.
  • Vihaya Events has an MCP server that GitHub Copilot can connect to with one config entry.
  • Buyers pay through Razorpay Checkout; you need no gateway account of your own.
  • Every confirmed booking gets a QR ticket by email automatically.
  • The OpenAPI spec at https://events.vihaya.app/api/v1/openapi.json gives GitHub Copilot the full API shape.

Step by step

  1. 1

    Create an API key and store it as a secret

    Sign up at Vihaya Events, open Developer → API keys and create a test key. Put it in your project’s .env file as VIHAYA_API_KEY and keep .env out of git. Never put a full key in browser code.

  2. 2

    Connect the Vihaya MCP server in VS Code

    Add this to .vscode/mcp.json. VS Code uses "servers" as the root key and "type": "http". MCP tools only run in Copilot’s Agent mode.

    .vscode/mcp.json
    {
      "servers": {
        "vihaya": {
          "type": "http",
          "url": "https://events.vihaya.app/api/mcp",
          "headers": {
            "x-api-key": "vihaya_test_sk_YOUR_KEY"
          }
        }
      }
    }
  3. 3

    Ask GitHub Copilot to build the site

    Paste this prompt into GitHub Copilot. It works with Next.js, React, SvelteKit, Astro or any stack GitHub Copilot prefers.

    prompt.txt
    Add real event ticket sales to this project using the Vihaya Events API.
    Do not add Stripe, Razorpay keys, a tickets database table, or buyer accounts.
    
    API docs: https://events.vihaya.app/docs
    OpenAPI: https://events.vihaya.app/api/v1/openapi.json
    Key: read VIHAYA_API_KEY from the environment. Never send it to the browser.
    Make the API calls from a server route (for example /api/book) that forwards to Vihaya with the key attached.
    
    1. Events page: GET https://events.vihaya.app/api/v1/events with header x-api-key. Show each item
       in data[] as a card: title, date, venue, price.
    2. Event page: GET https://events.vihaya.app/api/v1/events/{id} plus a form for name, email, phone.
    3. Booking: POST https://events.vihaya.app/api/v1/events/{id}/register with { name, email, phone }.
       - No orderId in the response means it is confirmed (free event).
       - Otherwise load https://checkout.razorpay.com/v1/checkout.js and open
         Razorpay Checkout with key = response.key, order_id = response.orderId.
    4. In the Razorpay handler, POST register again with { registrationId,
       orderId, paymentId, signature } taken from the Razorpay response.
    5. On success show "You're booked. Your ticket is in your email."
  4. 4

    Test, then switch to a live key

    With a test key nothing is charged and no email is sent. When the flow works, swap in a live key and publish the event.

Questions

What can GitHub Copilot do through the Vihaya MCP server?

Through the Vihaya Events MCP server, GitHub Copilot can list, create, edit and publish your events, add festival tracks, read registrations and sales, and preview or send attendee emails. New events are always created as drafts, so nothing goes public by accident.

Which framework should I ask GitHub Copilot to use?

Any framework works with the Vihaya Events API because it is plain HTTPS and JSON. Next.js is the simplest choice, since a route handler keeps the key on the server. Ask Copilot in Agent mode so it can create files across the project.

Why can Copilot not use the Vihaya tools?

MCP tools only run when Copilot Chat is in Agent mode, not Ask or Edit. Switch the mode in the chat box, then start the vihaya server from .vscode/mcp.json if VS Code has not started it.

Can I try it without taking real money?

Yes. Create a Vihaya test key. Test keys only work on test events: no payment gateway is called, no email is sent, no fee is charged and nothing is public. Swap in a live key when you launch.

What does it cost?

Free events cost nothing. Paid tickets carry a 1.75–4.5% Vihaya platform fee plus Razorpay's 3% gateway charge. The rate is fixed when the event is created and larger events get a lower rate. There is no monthly fee and API access is free.

Build the site. Skip the plumbing.

Start with a free test key. Switch to a live key when you are ready to sell.

Get a free test key API reference

Guides for other tools

  • Lovable
  • Payments
  • API
  • v0
  • Bolt
  • Replit
  • Windsurf
  • Webflow
  • WordPress
  • Framer, Wix, Squarespace

More guides

  • Add event ticketing to a Next.js site
  • Build an event ticketing site with Claude Code
  • Build an event ticketing site with Cursor
  • Vihaya Events for developers
§07 · Colophon
Vihaya Logo
Vihaya Events

The affordable ticketing stack for every kind of event in India. Concerts, fests, weddings, hackathons & more.

Kerala, INsupport@vihaya.app
What's new

Product updates, event stories, and build notes.

Read the latest updates →

Product

  • Event ticketing
  • Browse events
  • Event registration
  • AI form builder (coming soon)
  • Analytics
  • Integrations
  • Pricing

Company

  • About
  • Blog
  • News
  • Press kit

Compare

  • vs BookMyShow
  • vs MakeMyPass
  • vs KonfHub
  • vs Townscript

Use cases

  • All event types
  • Ticketing by city
  • College fest ticketing
  • Hackathon registration
  • Concert ticketing
  • Conference ticketing
  • Wedding registration

Support

  • Contact
  • Help center
  • Getting started
  • Documentation
  • Build on our API
  • FAQs
  • Report an issue
  • Sitemap

Legal

  • Terms
  • Privacy
  • Refunds
  • Shipping
EcosystemVihayaEventsResubyEduVihaya AI

© 2026 Vihaya Events. All rights reserved.

Built in IndiaShips weekly