PHPackages                             pushinbr/pam-native-subscriptions - 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. pushinbr/pam-native-subscriptions

ActivePam-native-plugin

pushinbr/pam-native-subscriptions
=================================

StoreKit 2 and Google Play Billing subscriptions for PAM Native.

v0.1.0(yesterday)03↑2900%BUSL-1.1KotlinPHP ^8.4CI passing

Since Aug 1Pushed yesterdayCompare

[ Source](https://github.com/push-in/pam-native-subscriptions)[ Packagist](https://packagist.org/packages/pushinbr/pam-native-subscriptions)[ RSS](/packages/pushinbr-pam-native-subscriptions/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PAM Native Subscriptions
========================

[](#pam-native-subscriptions)

StoreKit 2 and Google Play Billing subscriptions with products/offers, purchases, pending states, restore, signed JWS or Play purchase tokens, and explicit Play acknowledgement after server verification.

Never grant durable entitlement from the device callback alone. Send `verification` to your backend, validate it with the App Store Server API or Google Play Developer API, persist the entitlement, then acknowledge Google Play purchases.

Install
-------

[](#install)

```
composer require pushinbr/pam-native-subscriptions
pam mobile prepare
```

Configure matching product identifiers in App Store Connect and Google Play Console before querying the catalog.

Load and purchase
-----------------

[](#load-and-purchase)

```
use Pam\Native\Subscriptions\Subscriptions;

$subscriptions = new Subscriptions();
$subscriptions->products(['pro.monthly'], function (array $products) use ($subscriptions): void {
    $product = $products[0] ?? null;
    if ($product === null) {
        return;
    }

    $subscriptions->purchase(
        $product->identifier,
        fn ($transaction) => sendToYourBackend($transaction->verification),
        $product->offerToken,
    );
});
```

The purchase result distinguishes completed, pending, cancelled, and failed states through `SubscriptionPurchaseState`. Use `restore()` during account recovery and after sign-in on a new device.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19325395?v=4)[David William balbino](/maintainers/DavidWilliamBalbino)[@DavidWilliamBalbino](https://github.com/DavidWilliamBalbino)

---

Top Contributors

[![DavidWilliamBalbino](https://avatars.githubusercontent.com/u/19325395?v=4)](https://github.com/DavidWilliamBalbino "DavidWilliamBalbino (5 commits)")

---

Tags

mobilepam-nativephp

### Embed Badge

![Health badge](/badges/pushinbr-pam-native-subscriptions/health.svg)

```
[![Health](https://phpackages.com/badges/pushinbr-pam-native-subscriptions/health.svg)](https://phpackages.com/packages/pushinbr-pam-native-subscriptions)
```

PHPackages © 2026

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