1 Reply
      Latest reply on Aug 3, 2018 11:45 PM by danramtekeconsultinginc
      TomSwift Level 1 Level 1 (0 points)

        I'm submitting an iOS7-style App Receipt (obtained from the "appStoreReceiptURL") for validation and getting back unexpected results for an auto-renewing subscription.  The JSON I get back from Apple contains an array of "array of in-app purchase receipts".  Here's an example of one of those:







              "purchase_date":"2017-01-27 03:12:32 Etc/GMT",


              "purchase_date_pst":"2017-01-26 19:12:32 America/Los_Angeles",

              "original_purchase_date":"2017-01-27 03:11:46 Etc/GMT",


              "original_purchase_date_pst":"2017-01-26 19:11:46 America/Los_Angeles",

              "expires_date":"2017-01-27 04:12:32 Etc/GMT",


              "expires_date_pst":"2017-01-26 20:12:32 America/Los_Angeles",





        What is confusing to me is the "expires_date" field.   Here's what the documentation says:


        Subscription Expiration Date

        The expiration date for the subscription, expressed as the number of milliseconds since January 1, 1970, 00:00:00 GMT.

        ASN.1 Field Type 1708

        ASN.1 Field Value IA5STRING, interpreted as an RFC 3339 date

        JSON Field Name expires_date

        JSON Field Value number

        This key is only present for auto-renewable subscription receipts.


        I read this to say that the JSON field should contain a number, "expressed as the number of milliseconds".   Instead, it is returning an RFC 3339 date as a string.  I also note that there is an undocumented "expires_date_ms" field -- but we are expressly told not to use undocumented fields.