<doc>
	<legacy_id></legacy_id>
	<name>mobileStoreProductProperty</name>
	<type>function</type>

	<syntax>
		<example>mobileStoreProductProperty (<i>productID, propertyName)</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Retrieve a property of a purchased product.</summary>

	<examples>
<example><p>on purchaseStateUpdate pPurchaseID, pProductID, pState</p><p>   switch pState</p><p>      case "paymentReceived" </p><p>         answer "Payment received. Date of purchase is : " &amp;&amp; mobileStoreProductProperty (pProductID, "purchaseDate")        </p><p>         offerPurchasedProduct pProduct     </p><p>         mobileStoreConfirmPurchase pProductID</p><p>         mobileStoreDisablePurchaseUpdates</p><p>         </p><p>      case "error"</p><p>         ...</p><p>      case "invalidSKU"</p><p>         ...</p><p>      case "alreadyEntitled"</p><p>         ...</p><p>      case "restored"</p><p>         ...</p><p>      case "cancelled"</p><p>         ...</p><p>   end switch   </p><p>end purchaseStateUpdate</p></example>
	</examples>

	<history>
		<introduced version="6.7">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
	</classification>

	<references>
		<function tag="mobileStoreCanMakePurchase">mobileStoreCanMakePurchase function</function>
		<function tag="mobileStorePurchaseError">mobileStorePurchaseError function</function>
		<function tag="mobileStorePurchasedProducts">mobileStorePurchasedProducts function</function>
		<command tag="mobileStoreEnablePurchaseUpdates">mobileStoreEnablePurchaseUpdates command</command>
		<command tag="mobileStoreDisablePurchaseUpdates">mobileStoreDisablePurchaseUpdates command</command>
		<command tag="mobileStoreRestorePurchases">mobileStoreRestorePurchases command</command>
		<command tag="mobileStoreConsumePurchase">mobileStoreConsumePurchase command</command>
		<command tag="mobileStoreConfirmPurchase">mobileStoreConfirmPurchase command</command>
		<command tag="mobileStoreSetProductType">mobileStoreSetProductType command</command>
		<command tag="mobileStoreRequestProductDetails">mobileStoreRequestProductDetails command</command>
		<command tag="mobileStoreMakePurchase">mobileStoreMakePurchase command</command>
		<command tag="mobileStoreVerifyPurchase">mobileStoreVerifyPurchase command</command>
		<message tag="purchaseStateUpdate">purchaseStateUpdate message</message>
		<message tag="productDetailsReceived">productDetailsReceived message</message>
		<message tag="productRequestError">productRequestError message</message>
	</references>

	<description>
	<overview>Use the <b>mobileStoreProductProperty</b> function to retrieve a property of the purchased product.</overview>

		<parameters>
  <parameter>
    <name>productID</name>
    <description>Is the identifier of the requested product.</description>
  </parameter>
  <parameter>
    <name>propertyName</name>
    <description>Is the name of the requested property to get.</description>
  </parameter>		</parameters>

	<value>Returns the value of the requested property for the purchased product.</value>
	<comments>The function <b>mobileStoreProductProperty</b> is used to retrieve a property of the purchased product. It should be handled in the <message tag="purchaseStateUpdate">purchaseStateUpdate</message> message.<p></p><p></p><p></p><note> The properties that can be queried depend on the store that is used.</note><p></p><p>For Samsung Store (Android), you can query the properties:</p><p>- <i>title</i> : title of the item purchased</p><p>- <i>productId</i> : identifier of the purchased product</p><p>- <i>price</i> : price of purchased product</p><p>- <i>currencyUnit</i> : currency unit of the product price</p><p>- <i>description</i> : description of the item as specified in Samsung Seller Office</p><p>- <i>itemImageUrl</i> : URL where the image (if any) of the purchased product is stored</p><p>- <i>itemDownloadUrl</i> : URL to download the purchased product</p><p>- <i>paymentId</i> : payment ID of the purchased product</p><p>- <i>purchaseId</i> : purchase ID of the purchased product</p><p>- <i>purchaseDate</i> :  purchase date, in milliseconds</p><p>- <i>verifyUrl</i> : IAP server URL for checking if the purchase is valid for the IAP server, using the "purchaseId" value </p><p></p><p>For Google Play Store (Android), you can query the properties :</p><p>- <i>productId</i> : identifier of the purchased product</p><p>- <i>packageName</i> : application package for which the purchase originated</p><p>- <i>orderId</i> : unique order identifier for the transaction. This corresponds to the Google Wallet Order ID</p><p>- <i>purchaseTime</i> : time the product was purchased, in milliseconds </p><p>- <i>developerPayload</i> : developer-specified string that contains supplemental information about an order. You can specify a value for this in <command tag="mobileStoreMakePurchase">mobileStoreMakePurchase</command> </p><p>- <i>purchaseToken</i> : token that uniquely identifies a purchase for a given item and user pair.</p><p>- <i>itemType</i> : type of the purchased product, <i>inapp</i> or <i>subs</i></p><p>- <i>signature</i> : string containing the signature of the purchase data that was signed with the private key of the developer. The data signature uses the RSASSA-PKCS1-v1_5 scheme</p><p></p><p>For Amazon Store (Android) you can query the properties : </p><p>- <i>productId</i> : identifier of the purchased product</p><p>- <i>itemType</i> : type of the purchased item, <i>CONSUMABLE</i>, <i>ENTITLED</i> or <i>SUBSCRIPTION</i></p><p>- <i>subscriptionPeriod</i> : string indicating the start and end date for subscription (only for itemType = "<i>SUBSCRIPTION</i>")</p><p>- <i>purchaseToken</i> : purchase token that can be used from an external server to validate purchases</p><p></p><p>For iTunes Store (iOS), you can query for the properties:</p><p>- <i>quantity</i> : amount of product purchased. You can specify a value for this in <command tag="mobileStoreMakePurchase">mobileStoreMakePurchase</command></p><p>- <i>productId</i> : identifier of the purchased product</p><p>- <i>receipt</i> : block of data that can be used to confirm the purchase from a remote server with the itunes store</p><p>- <i>purchaseDate</i> : date the purchase/restore request was sent</p><p>- <i>transactionIdentifier</i> : unique identifier for a successful purchase/restore</p><p>- <i>originalPurchaseDate</i> : date of original purchase, for restored purchases</p><p>- <i>originalTransactionIdentifier</i> : transaction identifier of the original purchase, for restored purchases</p><p>- <i>originalReceipt</i> : the receipt for the original purchase, for restored purchases</p><p>&#9;</p></comments>
	</description>
</doc>