npx claudepluginhub fcsouza/agent-skills --plugin standalone-skillsThis skill uses the workspace's default tool permissions.
In-app purchases, subscriptions, consumables, webhooks, idempotency, and fraud prevention for games using Stripe.
Implements Stripe payment processing for checkout sessions, subscriptions, webhooks, refunds, and PCI-compliant flows in web/mobile apps.
Integrates Stripe Checkout for one-time payments and subscriptions, plus webhooks and customer portals, in Node.js/Next.js or Python web apps. Use for payment flows.
Implements Stripe payment processing for checkout sessions, subscriptions, webhooks, refunds, and customer management in PCI-compliant flows for web/mobile apps.
Share bugs, ideas, or general feedback.
In-app purchases, subscriptions, consumables, webhooks, idempotency, and fraud prevention for games using Stripe.
Trigger: payments, Stripe, IAP, in-app purchase, subscription, premium, battle pass, virtual currency, webhook, checkout, monetization
postgres-game-schema (player accounts, inventory, currency tables)betterauth-integration (authenticated player sessions)Sid Meier: "A game is a series of interesting decisions." Monetization should enable interesting decisions, not replace them.
bun add stripe
Use boilerplate/stripe-setup.ts to initialize the Stripe SDK, sync your product catalog, and link Stripe customers to player accounts.
Start with templates/product-catalog.ts to define your product types (consumable, subscription, currency bundle, cosmetic) and map them to Stripe price IDs and game rewards.
Use boilerplate/checkout.ts to create Stripe Checkout sessions for one-time purchases, subscriptions, and premium currency bundles. Always attach player metadata.
Implement boilerplate/webhooks.ts for signature verification, idempotent event processing, and two-phase fulfillment. Route events to typed handlers defined in templates/webhook-events.ts.
After recording a purchase, dispatch a fulfillment job via BullMQ (see bullmq-game-queues). The worker grants the items, currency, or subscription entitlement.
Listen for charge.refunded and charge.dispute.* events. Revoke granted rewards, deduct premium currency, and flag the player account for review.
Log every payment event with an audit trail. Track fulfillment status (pending, fulfilled, revoked) and alert on anomalies.
import { createCurrencyBundleCheckout } from './checkout';
const session = await createCurrencyBundleCheckout({
playerId: 'player_123',
priceId: 'price_premium_1000',
quantity: 1,
successUrl: 'https://game.example.com/store/success',
cancelUrl: 'https://game.example.com/store',
});
import { createSubscriptionCheckout } from './checkout';
const session = await createSubscriptionCheckout({
playerId: 'player_123',
priceId: 'price_battle_pass_monthly',
successUrl: 'https://game.example.com/pass/success',
cancelUrl: 'https://game.example.com/pass',
});
import { handleStripeWebhook } from './webhooks';
app.post('/webhooks/stripe', async ({ request }) => {
const sig = request.headers.get('stripe-signature')!;
const body = await request.text();
await handleStripeWebhook(body, sig);
return new Response('ok', { status: 200 });
});
See boilerplate/stripe-setup.ts for client configuration, boilerplate/checkout.ts for session creation, boilerplate/webhooks.ts for event handling, and templates/product-catalog.ts for product definitions.
betterauth-integration for authenticated player sessions and Stripe customer linkingpostgres-game-schema for purchase records, inventory, and currency tablesbullmq-game-queues for async fulfillment job dispatch and processinggame-economy-design for pricing strategy and currency balance designSid Meier: Monetization should enable interesting decisions, not replace them. A well-designed payment system gives players meaningful choices about how they engage with content. Premium currency buys time, not power. A battle pass rewards engagement, not spending. Fair monetization respects player skill and time investment — the best purchases enhance the experience without gating core gameplay.