In-App Purchase Programming Guide: Working with Subscriptions contains (at least) 4 errors.

Originator:s.pankevich
Number:rdar://33937017 Date Originated:2017-08-17
Status:Open Resolved:
Product:StoreKit Product Version:
Classification:Serious Bug Reproducible:Always
 
Area:
StoreKit

Summary:
We see the following two statements incorrect given the actual data that we receive.

1)

"
web_order_line_item_id
The primary key for identifying a subscription purchase. Posted only if the notification_type is CANCEL. See values in Table 6-4.
"

In the attached file "Issue-1-and-2.json" the type is INITIAL_BUY and we DO see the web_order_line_item_id field there.

2)

"
latest_receipt
The base-64 encoded transaction receipt for the most recent renewal transaction. Posted only if the notification_type is RENEWAL or INTERACTIVE_RENEWAL, and only if the renewal is successful.
"

In the attached file "Issue-1-and-2.json" the type is INITIAL_BUY and we DO see the latest_receipt field there.


3) 

"
expiration_intent
> This is the same as the Subscription Expiration Intent in the receipt. Posted only if notification_type is RENEWAL or INTERACTIVE_RENEWAL. See also Receipt Fields.
"

In the attached file "Issue-3.json" the type is INTERACTIVE_RENEWAL and we DO NOT see the latest_receipt field there.

4) "To determine if a status update notifications for a subscription event is in the test environment, check if the value of the environment key in the statusUpdateNotification JSON object equals SANDBOX."

In the attached file "Issue-4.json" the environment is "Sandbox", not "SANDBOX". At the same in other receipts we do see PROD as advertised by the docs. Please notice asymmetry between Sandbox (first letter capital) and PROD (all capital letters).

Steps to Reproduce:
Start receiving server side notifications for Subscriptions. Observe the results, compare them with what is advertised by the docs: 
"Working with Subscriptions / Status Update Notifications" 

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW13.

Expected Results:
We expect the docs to describe the actual data we get from Apple servers.

Observed Results:
We don't see the docs to describe the actual data we get from Apple servers.

Version:
Does not apply.

Notes:


Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!