Download the PHP package vihaya/events without Composer

On this page you can find all versions of the php package vihaya/events. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package events

Vihaya SDK for PHP โ€” Official vihaya/events Composer Package

Packagist Version Packagist Downloads PHP Version

vihaya/events is the official PHP SDK for the Vihaya Events platform. Build event listings, attendee registration flows, Razorpay payment verification, ticketing dashboards, Laravel apps, Symfony bundles, WordPress plugins, Drupal modules, Magento extensions, and any PHP 8.1+ backend โ€” all with type-safe readonly models and forward-compatible parsing.

Vihaya is the modern events platform for India โ€” a single stack for event organisers, ticketing, sponsor management, attendee registration, live check-in, and real-time analytics. This package is the fastest way to integrate the Vihaya Events API (https://events.vihaya.app) into any PHP codebase.


Table of contents


๐Ÿ‡ฎ๐Ÿ‡ณ What is Vihaya?

Vihaya is an all-in-one events platform for India, built for organisers who run college fests, hackathons, conferences, workshops, meetups, bootcamps, summits, and corporate events. The Vihaya platform provides:

This vihaya/events Composer package lets PHP developers embed the Vihaya Events API into Laravel apps, Symfony bundles, WordPress plugins, Drupal modules, Magento 2 extensions, Slim micro-services, CodeIgniter projects, Yii apps, CakePHP apps, and standalone PHP scripts.

Production URL: https://events.vihaya.app ยท Marketing site: https://vihaya.app ยท Developer dashboard: https://events.vihaya.app/profile/developer


โœจ Why the Vihaya PHP SDK?


๐ŸŒ The Vihaya SDK family (7 languages)

Language Package Repository Install
๐Ÿ˜ PHP vihaya/events Vishnu252005/vihaya-sdk-php composer require vihaya/events
๐ŸŸจ JavaScript / TypeScript vihaya-sdk Vishnu252005/vihaya-sdk npm install vihaya-sdk
๐Ÿ Python vihaya-events Vishnu252005/vihaya-sdk-python pip install vihaya-events
๐Ÿฆซ Go vihaya-sdk-go Vishnu252005/vihaya-sdk-go go get github.com/Vishnu252005/vihaya-sdk-go
โ˜• Java vihaya-sdk-java Vishnu252005/vihaya-sdk-java JitPack / Gradle / Maven
๐Ÿ’Ž Ruby vihaya-events Vishnu252005/vihaya-sdk-ruby gem install vihaya-events
๐Ÿ“ฑ Flutter / Dart vihaya_sdk_flutter Vishnu252005/vihaya-sdk-flutter flutter pub add vihaya_sdk_flutter

All Vihaya SDKs target the same API base URL (https://events.vihaya.app), authenticate with the same x-api-key header, and expose the same methods.


๐Ÿ“‹ Requirements


๐Ÿ“ฆ Installation

Then load Composer's autoloader:

Package name: vihaya/events on Packagist. PHP namespace: Vihaya\Events.


๐Ÿ”‘ Get your Vihaya API key

  1. Sign up or log in at events.vihaya.app.
  2. Open the Developer Dashboard.
  3. Click Generate API Key and copy the vh_live_... token.
  4. Store it in .env, environment variables, or a secrets manager โ€” never commit it to git.

๐Ÿš€ Quick start


โš™๏ธ Configuration

Parameter Default Description
$apiKey โ€” Required. Sent as the x-api-key header on every request.
$baseUrl https://events.vihaya.app Override for staging.
$headers [] Extra headers attached to every request.
$timeout 30.0 Per-request timeout in seconds.
$httpClient new Guzzle Inject a custom Guzzle client โ€” useful for tests, middleware, retries.

๐Ÿงญ Core concepts


๐Ÿ“š Usage guide

Fetch a full event

List & filter events

Register with tiers, promo codes, and custom fields

Register a hackathon team

You can pass a plain array instead of RegisterData โ€” use camelCase keys (teamMembers, customFields, paymentId) on that path.


๐ŸŽจ Framework integrations

Laravel

Symfony

WordPress plugin

Slim micro-framework


๐Ÿข Mega events & sub-events


๐Ÿ’ณ Razorpay payment flow

  1. Backend โ€” $vihaya->events()->register($id, $data) โ†’ Vihaya creates a Razorpay order and returns orderId.
  2. Frontend โ€” launch Razorpay Checkout with that order ID.
  3. Razorpay callback โ€” hands back razorpay_payment_id, razorpay_order_id, razorpay_signature.
  4. Backend โ€” $vihaya->payments()->verify(...) confirms the signature and marks the registration paid.

โš ๏ธ Always verify payments on the server. Never trust a signature checked only in the browser.


๐Ÿ“– API reference

new Vihaya(string $apiKey, ?string $baseUrl = null, array $headers = [], float $timeout = 30.0, ?ClientInterface $httpClient = null)

Construct a client. Get your API key from the developer dashboard.

$vihaya->events()->list(): list<Event>

Returns every event on the authenticated organiser account.

$vihaya->events()->get(string $eventId): Event

Fetches full metadata for one event โ€” agenda, speakers, sponsors, FAQs, pricing tiers, custom fields, venue info, and sub-events for mega events.

$vihaya->events()->register(string $eventId, RegisterData|array $data): array

Registers an attendee. Pass a RegisterData for type safety, or a plain array (camelCase keys). Returns the API response โ€” orderId for paid events, registrationId for free.

$vihaya->payments()->verify(string $paymentId, string $orderId, string $signature, ?float $amount = null): array

Server-side verification of a Razorpay payment signature. Always call from your backend.


๐Ÿงฌ Models

All models are final readonly classes (PHP 8.2+) with a fromArray() factory. Unknown fields are preserved on $model->raw, so the SDK is forward-compatible with new API fields without waiting for a release.


๐Ÿšจ Error handling

Every API and transport failure surfaces as VihayaException:


๐Ÿ›ก๏ธ Security best practices

Never hard-code a vh_live_... key in client-side JavaScript or front-end PHP templates.


โ“ FAQ

What is Vihaya?

Vihaya is an events platform for India โ€” ticketing, registrations, payments, check-in, analytics, and attendee management. Platform: vihaya.app. Dashboard: events.vihaya.app.

Does the SDK work with Laravel / Symfony / WordPress / Drupal / Magento?

Yes. It's a plain Composer package with PSR-4 autoloading and zero framework coupling. Drop it into any PHP 8.1+ project.

Why does the test suite use Guzzle's MockHandler?

So composer test runs fully offline โ€” no network, no VCR fixtures, no flakiness. CI is fast and deterministic.

A test asserts 49900 but my response shows 49900.0. Why?

json_encode collapses whole-number floats to integers. The Vihaya server parses both identically, so this is not an SDK bug. Use fractional amounts in tests (e.g., 499.99) or non-strict assertions.

Can I inject my own HTTP client?

Yes โ€” pass anything implementing GuzzleHttp\ClientInterface (or Psr\Http\Client\ClientInterface) as the fifth constructor argument. Useful for adding logging, tracing, retries, or middleware.

Does Vihaya support Razorpay test mode?

Yes โ€” use a test API key from the Vihaya developer dashboard.


๐Ÿ”Ž Keywords

vihaya ยท vihaya sdk ยท vihaya php ยท vihaya php sdk ยท vihaya events php ยท vihaya/events ยท vihaya api php ยท php events api ยท laravel vihaya ยท symfony vihaya ยท wordpress vihaya plugin ยท drupal vihaya module ยท magento vihaya ยท php ticketing sdk ยท php razorpay events ยท vihaya razorpay php ยท events api india php ยท event management sdk php ยท composer vihaya ยท packagist vihaya ยท events.vihaya.app php ยท vihaya official php sdk


๐Ÿ› ๏ธ Development

The test suite uses Guzzle's MockHandler and makes no real network calls.


๐Ÿค Contributing

Contributions to the Vihaya PHP SDK are very welcome. The project is open source and MIT-licensed.

  1. Fork Vishnu252005/vihaya-sdk-php.
  2. Create a feature branch.
  3. Run composer test, composer lint, and composer format.
  4. Commit, push, and open a Pull Request.

Reporting issues

Found a bug or have a feature request? Open an issue at github.com/Vishnu252005/vihaya-sdk-php/issues.


๐Ÿ“„ License

MIT ยฉ Vihaya. See LICENSE.


๐Ÿ’ฌ Support

Built with โค๏ธ by the Vihaya team.


Related Vihaya SDK repositories


All versions of events with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vihaya/events contains the following files

Loading the files please wait ...