StoreKit 2
Apple's modern in-app purchase framework — Swift-native async APIs with JWS-signed transactions that can be verified server-side without a shared secret.
Definition
StoreKit 2 is Apple's second-generation in-app purchase API, introduced with iOS 15. Unlike the original StoreKit (now called "StoreKit 1"), it provides Swift-native async/await APIs, a local transaction history, and JWS-signed transactions. The key improvement for server-side verification is that each transaction is signed with a JSON Web Signature (JWS) — your server can cryptographically verify it against Apple's root certificate without needing a shared secret or calling Apple's verifyReceipt endpoint.
StoreKit 2 also introduces the Transaction API for reading purchase history and the App Store Server API for server-side subscription management. The combination of JWS-signed transactions and the server API enables a fully server-side entitlement model for iOS apps.
Examples
- An iOS app purchases a subscription. StoreKit 2 returns a JWS-signed transaction. The app sends this to the backend, which verifies the signature against Apple's root certificate and extracts the purchase details.
- Tierux's Apple verification path accepts the JWS representation directly — no shared secret, no verifyReceipt endpoint call. The signature is checked server-side before any entitlement is granted.
- StoreKit 2's local transaction listener provides offline access to purchase history, but server-side verification remains the authoritative check for gating premium features.
Server-side receipt validation
StoreKit 2's JWS transactions make server-side validation simpler — no shared secret needed.
Entitlement
After JWS verification, the StoreKit 2 transaction maps to an entitlement record.
Google Play Billing
The Android equivalent — Google Play Billing Library handles purchases on the Android side.
Verify StoreKit 2 transactions server-side
Free tier — unlimited apps, 1 paywall. No credit card, no revenue share.
Start free