Purchase date in receipt file MAS

Does anybody know how can I read the purchase date from the “receipt” file in folder _MASReceipt?
Here is the description from Apple:

Purchase Date
The date and time that the item was purchased.

ASN.1 Field Type 1704
ASN.1 Field Value IA5STRING, interpreted as an RFC 3339 date
JSON Field Name purchase_date
JSON Field Value string, interpreted as an RFC 3339 date
This value corresponds to the transaction’s transactionDate property.

For a transaction that restores a previous transaction, the purchase date is the date of the restoration. Use Original Purchase Date to get the date of the original transaction.

In an auto-renewable subscription receipt, this is always the date when the subscription was purchased or renewed, regardless of whether the transaction has been restored.

Please check my AppReceiptMBS class.
It has support for in app purchases and allows your app to check what was paid.

https://www.monkeybreadsoftware.net/class-appreceiptmbs.shtml

Is there any example how to use this?
AppReceiptIAPMBS.purchaseDate as Date

Did you see the example “Verify App Receipt and In-App Purchases”?

Yes, I have run this project, but it is for AppInPurchases not for application purchase date.

dim inAppPurchases() as AppReceiptIAPMBS = Receipt.inAppPurchases
List.AddRow "inAppPurchases: "+str(UBound(inAppPurchases)+1)

for each p as AppReceiptIAPMBS in inAppPurchases

ah, so you ask me to add this property…

Okay, I can add an creationDate. The receipt also contains two other date fields. Maybe you can help to identify them?

Like request date, original purchase date or so.
I’ll email you a new plugin to try.

This information is also stored in Spotlight, if you use MDItem (which I believe the MBS also has) you can extract this and other information about the purchase of the app on the App Store (but you can’t get In-App-Purchase information).

Added AppReceiptMBS.creationDate, AppReceiptMBS.purchaseDate and AppReceiptMBS.transactionDate properties.

I think those help people.

For Horst, it may be good to look in StoreKit classes, too.