Purchases/receipts and encryption info
[ouya-store-api.git] / api / devs.ouya.tv / api-v1-games-xxx-purchases.post.rst
index 55c1614a7234206686a513118e897bb039a47165..55db3b122cd57edb857310af18abfcd25fb86426 100644 (file)
@@ -40,14 +40,27 @@ GET parameters
     ``launcher`` (at least when bought through the OUYA UI)
 POST parameters
   ``blob``
-    Encrypted data
+    Base64-encoded encrypted data
   ``iv``
-    FIXME: Initialization vector for the cryptographic function
+    Base64-encoded initialization vector for the cryptographic function
   ``key``
-    FIXME: Key used to encrypt the data. FIXME: symmetric or assymetric?
+    Base64-encoded key used to encrypt the data. FIXME: symmetric or assymetric?
   ``auth_token``
     Same as ``X-OUYA-AuthToken``
 
+The decrypted ``blob`` contains a JSON object:
+
+``identifier``
+  Product key
+``testing``
+  Unknown. Always "true".
+``uuid``
+  Random number that is used by the game for this purchase request.
+  Must be returned in the response to this request.
+
+.. include:: api-v1-games-xxx-purchases.post.request-decrypted.json
+   :code:
+
 
 HTTP response
 =============
@@ -56,6 +69,11 @@ Status code
 Content-type
   ``application/json; charset=utf-8``
 
+Again the base-64 encoded keys: ``iv``, ``key`` and ``blob``.
+
+``blob`` is a JSON object that needs to contain the ``uuid`` property.
+Other properties in the response are unknown.
+
 Example
 -------