WWDC Notes

Engineering Subscriptions

Show Apple's description.
Learn the best practices for architecting your subscription infrastructure using StoreKit and server-side logic. Find out about simple engineering techniques to keep your subscribers longer, and how to utilize new tools and APIs to give your subscribers the best experience.

1. Device and Server Architecture

1. Receive Transaction

2. Verify Authenticity

App Store Receipt

It's a trusted record of App and In-App purchases, stored on device, issued by the App Store.

It's for your app, on that device only.

Receipt Validation

On-device vs Server-to-server.
- Don't use online validation directly from the device. - Request from Apple - Send binary receipt data to your own server. - The server send it to Apple Server to get it verified or not.

3. Update Subscription Status

orignaltransactionid -> user’s subscription ID
Does user have active subscription?

  1. Filter transactions by originaltransactionid
  2. Find the transaction with latest expiresdate (sort transactions by expiresdate)
  3. Date in the past shows user not active subscribed.
  4. Date in future shows user active

Status Polling

Discover new transactions directly from your server.
- Save latest version of encoded receipt data on your serer(latestReceiptData, exclude-old-transactions: true) - Treat receipt data like a token - /verifyReceipt response also includes new transactions - Located in the latestreceiptinfo field - Unlock new subscription periods without waiting for app to launch
New transactions will still appear in StoreKit on next app launch - Must verify and finish these transactions - Even if your server already knows about them - Opportunity to update latest receipt data on server

Reacting to Billing Issues

  1. Observe no renewal transaction appears
  2. Direct user to amend their billing details
  3. Unblock user immediately when transaction occurs

2. In-App Experience

  1. Creating User Accounts
  2. Introductory Pricing
  3. Upgrade/Downgrade Subscriptions
  4. Subscription Management

3. Reducing Subscriber Churn


  1. Involuntary churn
  2. Voluntary churn
  3. Winback


  1. Leverage subscription specific receipt fields
  2. Implement status polling
  3. Implement customer messaging
  4. Present contextual subscription offers


  • Server side state management offers more flexibility
  • Use notifications from the App Store
  • Offer introductory pricing
  • Reduce churn with simple messaging
  • Win back users with alternative subscription options
  • New reporting tools in App Store Connect

This note was originally published at https://github.com/antonio081014/WWDC_Learning_Review

Missing anything? Corrections? Contributions are welcome 😃

Written by


Yi Ding

Write the Code, Change the World.