Home > Uncategorized > Anatomy of an #IAP Receipt

Anatomy of an #IAP Receipt

logo-storekit

After a In app purchase is made, then you get a digital receipt from Apple if you call storekit.loadReceipts – Which is effectively a double-encoded Base 64 string, When you encode once you get this:

{
“signature” = “… data …”;
“purchase-info” = “… data …”;
“environment” = “Sandbox”;
“pod” = “100”;
“signing-status” = “0”;
}

Where Signature and purchase-info are base64 encoded. Signature is effectively binary data, but you can make out some text that belies its contents

Apple Inc. Apple Worldwide Developer Relations

Apple Worldwide Developer Relations Certification Authority

Mac App Store and iTunes Store Receipt Signing,

Apple Worldwide Developer Relations

Apple Inc

http://ocsp.apple.com/ocsp03-wwdr

Reliance on this certificate by any party assumes acceptance of the then applicable standard terms and conditions of use, certificate policy and certification practice statements.

http://www.apple.com/certificateauthority

The purchase-info field is more JSON, which is more useful.

{
“original-purchase-date-pst” = “2017-03-21 13:25:40 America/Los_Angeles”;
“purchase-date-ms” = “1490127939469”;
“unique-identifier” = “d2c92e2ce1f259f623d66e6df364b4ed6da1b2cd”;
“original-transaction-id” = “1000000283718133”;
“expires-date” = “1490128239469”;
“transaction-id” = “1000000283718133”;
“original-purchase-date-ms” = “1490127940017”;
“web-order-line-item-id” = “1000000034637027”;
“bvrs” = “1.2.0”;
“unique-vendor-identifier” = “06FFEBC2-47F3-4848-AFB2-A45211674A81”;
“expires-date-formatted-pst” = “2017-03-21 13:30:39 America/Los_Angeles”;
“item-id” = “1215609502”;
“expires-date-formatted” = “2017-03-21 20:30:39 Etc/GMT”;
“product-id” = “CloudAnsweringMachineSubscription”;
“purchase-date” = “2017-03-21 20:25:39 Etc/GMT”;
“original-purchase-date” = “2017-03-21 20:25:40 Etc/GMT”;
“bid” = “ie.infiniteloop.cloudansweringmachine”;
“purchase-date-pst” = “2017-03-21 13:25:39 America/Los_Angeles”;
“quantity” = “1”;
}

Advertisements
Categories: Uncategorized
  1. March 21, 2017 at 8:54 pm
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: