PHPackages                             passninja/passninja - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. passninja/passninja

ActiveLibrary[API Development](/categories/api)

passninja/passninja
===================

A PassNinja API helper library for PHP

1.0.1(1y ago)0285MITPHP

Since Jun 15Pushed 2w ago2 watchersCompare

[ Source](https://github.com/flomio/passninja-php)[ Packagist](https://packagist.org/packages/passninja/passninja)[ RSS](/packages/passninja-passninja/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

 [![](https://user-images.githubusercontent.com/1587270/74537466-25c19e00-4f08-11ea-8cc9-111b6bbf86cc.png)](https://user-images.githubusercontent.com/1587270/74537466-25c19e00-4f08-11ea-8cc9-111b6bbf86cc.png)

passninja-php
=============

[](#passninja-php)

### Use [passninja-php](https://passninja.com/docs) as a PHP package.

[](#use-passninja-php-as-a-php-package)

 [ ![Status](https://camo.githubusercontent.com/263f3694f42afc27e06a1ff829cd63884893b55624e13a16893dd0a3ba772b94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d737563636573732e737667) ](https://github.com/flomio/passninja-php) [ ![Issues](https://camo.githubusercontent.com/a3c858f0340a56a23f567d988a7746a04e1bde0fa68b1410d679bb82f5e95c6a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f666c6f6d696f2f706173736e696e6a612d7068702e737667) ](https://github.com/flomio/passninja-php/issues) [ ![Package](https://camo.githubusercontent.com/6d7186ae51ca3bef4a0edd78d81140a52c2d91f3df5066cd20f9f9aaccb2a3ec/68747470733a2f2f696d672e736869656c64732e696f2f67656d2f762f706173736e696e6a612e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/passninja/passninja)

Contents
========

[](#contents)

- [Contents](#contents)
- [Installation](#installation)
- [Usage](#usage)
    - [`PassNinjaClient`](#passninjaclient)
    - [`PassNinjaClient Methods`](#passninjaclient-methods)
    - [Examples](#examples)
- [Documentation](#documentation)

Installation
============

[](#installation)

Install via Composer:

```
composer require passninja/passninja
```

Usage
=====

[](#usage)

`PassNinjaClient`
-----------------

[](#passninjaclient)

Use this class to create a `PassNinjaClient` object. Make sure to pass your user credentials to make any authenticated requests.

```
use PassNinja\PassNinjaClient;

$account_id = '**your-account-id**'
$api_key = '**your-api-key**'
$pass_ninja_client = new PassNinjaClient($account_id, $api_key);
```

We've placed our demo user API credentials in this example. Replace it with your [actual API credentials](https://passninja.com/auth/profile) to test this code through your PassNinja account and don't hesitate to contact [PassNinja](https://passninja.com) with our built in chat system if you'd like to subscribe and create your own custom pass type(s).

`PassNinjaClient Methods`
-------------------------

[](#passninjaclient-methods)

This library currently supports methods for creating, getting, updating, and deleting passes via the PassNinja API. The methods are outlined below.

### Get Pass Template Details

[](#get-pass-template-details)

```
$pass_template = $pass_ninja_client->passTemplate['find']('ptk_0x14'); # passType or pass template key
```

### Create

[](#create)

```
$simple_pass_object = $pass_ninja_client->pass['create'](
  'ptk_0x14', # passType
  [
    'discount' => '50%',
    'memberName' => 'John'
  ] # passData
)
```

### Find

[](#find)

Finds issued passes for a given pass template key

```
$pass_objects = $pass_ninja_client->pass['find']('ptk_0x14') # passType or pass template key
```

### Get

[](#get)

```
$detailed_pass_object = $pass_ninja_client->pass['get'](
  'ptk_0x14', # passType
  'ce61b0e13da9a7fe7e' # serialNumber
)
```

### Decrypt

[](#decrypt)

Decrypts issued passes payload for a given pass template key

```
$decrypted_pass_object = $pass_ninja_client->pass['decrypt'](
  'ptk_0x14', # passType
  '55166a9700250a8c51382dd16822b0c763136090b91099c16385f2961b7d9392d31b386cae133dca1b2faf10e93a1f8f26343ef56c4b35d5bf6cb8cd9ff45177e1ea070f0d4fe88887' # payload
)
```

### Update

[](#update)

```
$updated_pass_object = $pass_ninja_client->pass['update'](
  'ptk_0x14', # passType
  'ce61b0e13da9a7fe7e', # serialNumber
  [
    'discount' => '100%',
    'memberName' => 'Ted'
  ] # passData
)
```

### Delete

[](#delete)

```
$deleted_pass_serial_number = $pass_ninja_client.pass['delete'](
  'ptk_0x14', # passType
  'ce61b0e13da9a7fe7e' # serialNumber
)
```

Documentation
=============

[](#documentation)

- [PassNinja Docs](https://www.passninja.com/documentation)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance76

Regular maintenance activity

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

373d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e73d807c1eaf9c424fca109beba6985b7aef5607cd9f901ee2f509e3a6fd29f6?d=identicon)[passninja](/maintainers/passninja)

---

Top Contributors

[![grundyoso](https://avatars.githubusercontent.com/u/876837?v=4)](https://github.com/grundyoso "grundyoso (4 commits)")[![bkhushang](https://avatars.githubusercontent.com/u/11754357?v=4)](https://github.com/bkhushang "bkhushang (3 commits)")[![flomio](https://avatars.githubusercontent.com/u/693705?v=4)](https://github.com/flomio "flomio (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/passninja-passninja/health.svg)

```
[![Health](https://phpackages.com/badges/passninja-passninja/health.svg)](https://phpackages.com/packages/passninja-passninja)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
