title: Getting subscription data in Android in-app billing
body: <p>I am integrating the Google in-app billing, especially subscriptions, into our application. </p>
  
  <p>Now I just can not figure out how to get the following data from IMarketBillingService (Google Play) to my app:</p>
  
  <ul>
  <li><p>price information</p></li>
  <li><p>subscription expiry date (of the currently paid period)</p></li>
  <li><p>notification if the user cancels an on-going subscription</p></li>
  </ul>
  
  <p>The following code parses the JSON object that results from get purchase information, but there is no price field in it. Yet the Google IAP documentation says price is available!?</p>
  
  <pre><code>JSONObject jElement = jTransactionsArray.getJSONObject(i);
  int response = jElement.getInt("purchaseState");
  PurchaseState purchaseState = PurchaseState.valueOf(response);
  String productId = jElement.getString("productId");
  String packageName = jElement.getString("packageName");
  long purchaseTime = jElement.getLong("purchaseTime");
  String orderId = jElement.optString("orderId", "");
  String purchase_token = jElement.optString("purchaseToken", "");
  String notifyId = null;
  if (jElement.has("notificationId")) {
    notifyId = jElement.getString("notificationId");
  }
  String developerPayload = jElement.optString("developerPayload", null);
  </code></pre>
  
  <p>Any help?</p>