in-app-purchases

Implement and validate StoreKit 2 in-app purchases with a testable workflow.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill in-app-purchases
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: in-app-purchases
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/in-app-purchases
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill in-app-purchases

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This discipline guides robust StoreKit 2 implementations, including testing-first configuration, transaction handling, restoration, and server-side validation.

Core Features & Use Cases

  • Testing-first workflow with .storekit configuration
  • Transaction handling, restoration, and subscription status
  • Server-side receipt validation and IAP server APIs

Quick Start

Prompt: "Set up a StoreKit 2 config and load a product for testing."

Frequently Asked Questions about in-app-purchases

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement in-app purchases in iOS using StoreKit 2?

StoreKit 2 in-app purchases are implemented by configuring products in a .storekit file, creating a centralized StoreManager to observe Transaction.updates, and handling consumables, non-consumables, and auto-renewable subscriptions. This approach replaces the older StoreKit API with a modern, async/await workflow for product setup, transaction handling, and receipt verification.

What's the best way to test StoreKit 2 transactions before shipping to production?

Use a testing-first workflow with a .storekit configuration file to simulate purchases, subscriptions, and restores in the sandbox environment. Write unit tests that validate transaction observation, subscription status changes, and receipt verification logic without hitting the App Store, ensuring your StoreManager handles all purchase flows correctly.

How do I handle subscription status and restore purchases with StoreKit 2?

Monitor auto-renewable subscriptions by observing Transaction.updates to track active, expired, and revoked states. Implement a restore-purchases function that re-fetches the transaction history and updates your centralized observable state, allowing users to restore previous purchases across devices.

Do I need server-side validation for StoreKit 2 receipts?

Yes, server-side receipt validation is essential for production in-app purchases. Verify receipts against Apple's IAP server APIs to prevent fraud and confirm legitimate transactions, especially for non-consumables and subscriptions where users expect persistent access across reinstalls and devices.

Can I use StoreKit 2 for consumable purchases like in-game currency?

Yes, StoreKit 2 supports consumable products through the same unified API as non-consumables and subscriptions. Handle consumables by observing finished transactions, updating user inventory in your app state, and marking transactions as finished to enable repeat purchases.

What happens if transaction observation fails or the app crashes during a purchase?

StoreKit 2's Transaction.updates stream persists across app launches, so unfinished transactions are re-delivered when the app reopens. Your centralized StoreManager must replay pending transactions on startup and call finish() only after confirming the purchase was processed, preventing lost or duplicate transactions.