PAM Native Subscriptions
Start here
Section titled “Start here”Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | shpam doctorpam init my-app --template nativecd my-apppam composer require pushinbr/pam-native-subscriptionspam doctorpam native dev$subscriptions = new Subscriptions();$subscriptions->products(['pro.monthly'], function (array $products) use ($subscriptions): void { if (($product = $products[0] ?? null) === null) return; $subscriptions->purchase( $product->identifier, fn ($transaction) => sendToBackend($transaction->verification), $product->offerToken, );});Subscriptions loads products, purchases, restores, and acknowledges;
SubscriptionProduct normalizes price/offers; SubscriptionTransaction
carries JWS/Play verification material; SubscriptionPurchaseState separates
completed, pending, cancelled, and failed.
Verify every transaction through App Store Server or Google Play Developer API, persist entitlement server-side, then acknowledge Play. Never grant durable entitlement from a device callback. Reconcile after sign-in and account restore.
SubscriptionsPluginProvider registers the store module automatically.