1 ========================================================
2 ``POST https://devs.ouya.tv/api/v1/games/xxx/purchases``
3 ========================================================
7 After buying the game shows up in
8 `GET https://devs.ouya.tv/api/v1/premium_purchases`_.
13 - When the user buys an app/game.
25 ``/api/v1/games/xxx/purchases``
30 Example: ``/api/v1/games/com.ChrisChung.CatlateralDamage/purchases``
35 ``application/x-www-form-urlencoded``
38 Same as ``X-OUYA-AuthToken``
40 ``launcher`` (at least when bought through the OUYA UI)
43 Base64-encoded encrypted data
45 Base64-encoded initialization vector for the cryptographic function
47 Base64-encoded key used to encrypt the ``blob``.
48 Encrypted with FIXME: gamer key or developer key.
50 Same as ``X-OUYA-AuthToken``
52 The decrypted ``blob`` again contains ``blob``, ``key`` and ``iv``.
54 The decrypted inner ``blob`` contains a JSON object:
59 Unknown. Always "true".
61 Random number that is used by the game for this purchase request.
62 Must be returned in the response to this request.
64 Raw request (without encryption):
66 .. include:: api-v1-games-xxx-purchases.post.request-nocrypt.json
71 .. include:: api-v1-games-xxx-purchases.post.request-decrypted.json
80 ``application/json; charset=utf-8``
82 Again the base-64 encoded keys: ``iv``, ``key`` and ``blob``.
84 ``blob`` is a JSON object that needs to contain the ``uuid`` property.
85 Most games do not want any other properties.
87 "God of Blades" requires:
96 .. include:: api-v1-games-xxx-purchases.post.response.json