Try the demo

See a working in-app purchase in under 10 minutes. No PurchaseKit account or Apple Developer account needed.

The demo runs entirely locally using Xcode's StoreKit Configuration. You'll make a test purchase and see how PurchaseKit handles the entire flow.

Prerequisites

  • macOS with Xcode 26+
  • Ruby 3.2+ with Bundler

1. Clone the repo

git clone https://github.com/purchasekit/purchasekit-demo.git
cd purchasekit-demo

2. Start the Rails server

cd demo/rails/pay
bin/setup

The server starts on http://localhost:3000. Leave this terminal running.

3. Run the iOS app

  1. Open demo/ios/PurchaseKitDemo.xcodeproj in Xcode
  2. Select the PurchaseKitDemo scheme and an iPhone simulator
  3. Press Cmd+R to build and run

The app connects to your local Rails server automatically.

4. Make a test purchase

  1. Sign in with user@example.com / password
  2. Tap the Subscribe button on the paywall
  3. Confirm the purchase in the StoreKit dialog
  4. Watch the app redirect to the success page

That's it. You just completed an in-app purchase flow!

What just happened?

  1. The Rails app rendered an HTML paywall
  2. Hotwire Native displayed it in the iOS app
  3. You tapped subscribe, triggering StoreKit
  4. The gem's demo mode simulated the webhook locally
  5. A Pay::Subscription record was created
  6. The user was redirected to the success page

In production, steps 4-5 happen via PurchaseKit's webhook infrastructure instead of locally.

Next steps

Ready to add purchases to your app?

  1. Create an account on PurchaseKit
  2. Follow the Getting started guide