After watching all related WWDC content on auto-renewing subscriptions, including the most recent 2021 session titled "Manage IAP On Your Server," it's still unclear what actions are required for developers when an auto-renewing subscription is initially purchased using Store Kit 1 + Server Notifications v2.
From "Manage IAP On Your Server" around 21:30 a diagram of the initial subscription flow is shown:
What is most unclear to me is:
Is it necessary to retrieve the receipt data from the device and send it to the application server (to then be sent to Apple's server to verify and get the decoded data) if the App Store server is going to be sending a SUBSCRIBED + INITIAL_BUY notification around the same time to the application server anyway?
If it is still necessary to verify the receipt data from the local device, then what purpose does the SUBSCRIBED + INITIAL_BUY notification serve? What should the application server do when this notification is received if the subscription status has already been updated based on the receipt data?
It seems that the recommendation from Apple is to verify the receipt data from the device to obtain the original_transaction_id and then use this value to relate future server notifications received for this id.
Looking at the JWSTransactionDecodedPayload, it includes a field called appAccountToken however, it appears as though this can only be utilized with the iOS15+ StoreKit2 API.
It would be greatly appreciated if someone could clarify the required steps for managing an initial purchase on both the client and server for:
StoreKit 1 + Server Notifications v2
StoreKit 2 + Server Notifications v2
(I would love to start with StoreKit 2; however, I don't think it is feasible to limit purchases to iOS15+ at this time, given the large # of users still using older versions of iOS.)
Thank you!
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
Subscriptions
Business Models
wwdc21-10174