
Research
/Security News
CanisterWorm: npm Publisher Compromise Deploys Backdoor Across 29+ Packages
The worm-enabled campaign hit @emilgroup and @teale.io, then used an ICP canister to deliver follow-on payloads.
scgs-capacitor-subscribe
Advanced tools
Capacitor plugin for handling subscriptions on Android and iOS using Google Play Billing v7 and StoreKit 2
A Capacitor plugin for handling in-app subscriptions on iOS and Android.
npm install scgs-capacitor-subscribe
npx cap sync
import { Subscribe } from 'scgs-capacitor-subscribe';
// Initialize the plugin
await Subscribe.initialize({
enablePendingPurchases: true,
enableLogging: true
});
// Get available products
const { products, invalidProductIds } = await Subscribe.getProducts({
productIds: ['monthly_subscription', 'yearly_subscription']
});
// Purchase a product
try {
const { purchase } = await Subscribe.purchaseProduct({
productId: 'monthly_subscription'
});
console.log('Purchase successful:', purchase);
} catch (error) {
console.error('Purchase failed:', error);
}
// Restore purchases
const { purchases } = await Subscribe.restorePurchases({
userId: 'user123' // optional
});
// Get active purchases
const { purchases: activePurchases } = await Subscribe.getActivePurchases({
userId: 'user123' // optional
});
// Check eligibility for introductory price
const { eligible, introductoryPriceEligible } = await Subscribe.checkEligibility({
productId: 'monthly_subscription'
});
// Present code redemption sheet (iOS only)
await Subscribe.presentCodeRedemptionSheet();
Initialize the plugin. Should be called once when your app starts.
Options:
enablePendingPurchases (boolean): Enable pending purchases (default: true)enableLogging (boolean): Enable debug logging (default: false)Fetch product details from the store.
Options:
productIds (string[]): Array of product IDs to fetchReturns:
products (Product[]): Array of available productsinvalidProductIds (string[]): Array of product IDs that weren't foundInitiate a purchase.
Options:
productId (string): Product ID to purchasequantity (number): Quantity to purchase (optional, default: 1)userId (string): User ID (In Android it is set to obfuscatedAccountId) (In iOS it is set to appAccountToken)obfuscatedProfileId (string): Obfuscated profile ID (Android only, optional)offerToken (string): Offer token for the purchase (Android only, optional)Returns:
purchase (Purchase): The completed purchase detailsRestore previously made purchases.
Options:
userId (string): User ID for filtering purchases (optional)Returns:
purchases (Purchase[]): Array of restored purchasesGet currently active (non-expired) purchases.
Options:
userId (string): User ID for filtering purchases (optional)Returns:
purchases (Purchase[]): Array of active purchasesAcknowledge a purchase (Android only, automatically handled on iOS).
Options:
purchaseToken (string): The purchase token to acknowledgedeveloperPayload (string): Developer payload (optional)Consume a purchase (Android only).
Options:
purchaseToken (string): The purchase token to consumeCheck if user is eligible for introductory price or discounts.
Options:
productId (string): Product ID to checkReturns:
eligible (boolean): Whether user is eligible to purchaseintroductoryPriceEligible (boolean): Whether user is eligible for intro pricediscountEligible (boolean): Whether user is eligible for discountsPresent the code redemption sheet (iOS only).
interface Product {
productId: string;
title: string;
description: string;
price: string;
priceAmount: number;
priceCurrencyCode: string;
priceLocale: string;
subscriptionPeriod?: SubscriptionPeriod;
introductoryPrice?: IntroductoryPrice;
discounts?: Discount[];
}
interface Purchase {
productId: string;
purchaseToken: string;
transactionId: string;
purchaseTime: number;
purchaseState: PurchaseState;
autoRenewing?: boolean;
acknowledged: boolean;
orderId?: string;
packageName?: string;
developerPayload?: string;
userId?: string;
price?: string; // Formatted display price (e.g., "$9.99")
priceAmount?: number; // Numeric price amount (e.g., 9.99)
priceCurrencyCode?: string; // Currency code (e.g., "USD")
}
interface SubscriptionPeriod {
value: number;
unit: PeriodUnit; // 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
}
enum PurchaseState {
UNSPECIFIED = 0,
PURCHASED = 1,
PENDING = 2
}
The plugin will reject promises with descriptive error messages when operations fail. Common errors include:
MIT
FAQs
Capacitor plugin for handling subscriptions on Android and iOS using Google Play Billing v7 and StoreKit 2
The npm package scgs-capacitor-subscribe receives a total of 1 weekly downloads. As such, scgs-capacitor-subscribe popularity was classified as not popular.
We found that scgs-capacitor-subscribe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The worm-enabled campaign hit @emilgroup and @teale.io, then used an ICP canister to deliver follow-on payloads.

Research
/Security News
Attackers compromised Trivy GitHub Actions by force-updating tags to deliver malware, exposing CI/CD secrets across affected pipelines.

Security News
ENISA’s new package manager advisory outlines the dependency security practices companies will need to demonstrate as the EU’s Cyber Resilience Act begins enforcing software supply chain requirements.