Apps/WebApplicationReceipt: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 8: Line 8:


* <tt>typ</tt>: MUST be the string <tt>"purchase-receipt"</tt>
* <tt>typ</tt>: MUST be the string <tt>"purchase-receipt"</tt>
* <tt>product</tt>: A URL identifying the product the receipt covers
* <tt>product</tt>: A URL identifying the product the receipt covers and any store specific data.
* <tt>user</tt>: An independently-verifiable identifier for the user that made the purchase.
* <tt>user</tt>: An independently-verifiable identifier for the user that made the purchase.
* <tt>iss</tt>: A full domain (scheme, host, and port) for the store that issued the receipt
* <tt>iss</tt>: A full domain (scheme, host, and port) for the store that issued the receipt
Line 18: Line 18:
=== the product field ===
=== the product field ===


The <tt>product</tt> field identifies the digital good whose sale is represented by the receipt.  Conventionally, it is a URL.  A URL representing the root of a domain, without a trailing slash (e.g. <tt>"https://someapp.com"</tt>), is conventionally defined to represent "a web application"; URLs rooted further inside the site are conventionally defined to represent "in-application purchases", and can use whatever path scheme is convenient to the developer and issuer of the receipt.
The <tt>product</tt> field identifies the digital good whose sale is represented by the receipt.  It is a JSON object structure, containing the following fields:
 
* <tt>url</tt>: A URL representing the root of a domain, without a trailing slash (e.g. <tt>"https://someapp.com"</tt>), is conventionally defined to represent "a web application"; URLs rooted further inside the site are conventionally defined to represent "in-application purchases", and can use whatever path scheme is convenient to the developer and issuer of the receipt.
* <tt>storedata</tt>: A string that uniquely identifies this app for the verifier of the receipt.


=== the user field ===
=== the user field ===
Line 53: Line 56:
  {
  {
   typ: "purchase-receipt",
   typ: "purchase-receipt",
   product: "https://grumpybadgers.com",
   product: {
    url: "https://grumpybadgers.com",
    storedata: "5169314356"
  },
   user: {
   user: {
     type: "email",
     type: "email",
Confirmed users
1,158

edits