I have worked with many developers that have separate apps on Fire tablets and Fire TV. You may be considering this approach, but if you plan to sell the same in-app purchase (IAP) items in both apps, be aware that having separate apps increases the complexity of the integration and can lead to a poor customer experience. In this blog post, I’ll walk you through both approaches.
Two apps approach
Let’s start with the best customer experience, which is a customer buys an IAP item in one app, and automatically gets it in the other. This requires creating an IAP item for each app in Developer Portal and associating them with the same SKU.
The first step is to create an IAP item for the first app and enter the SKU. The SKU in our example is named “my.sku”.
The next step is to create an IAP item for the second app and enter the same SKU.
When you hit the Save button, you see this error message that the SKU must be unique.
SKUs cannot be shared across apps, as they are unique to each developer. Developers usually rename the SKU, appending an identifier like the device type. For example, if the SKU is on Fire TV, it might be renamed, “my.sku.tv”.
The best customer experience can still be achieved if the SKU purchased by the customer is linked to the customer’s user id. The IAP API has a method called getUserData() which contains the user id. When the customer buys the item, you verify the receipt with Amazon’s receipt verification service (RVS). Once verified, you link the SKU to the user id in your back-end system.
When the Fire TV or Fire tablet app starts up, you retrieve the user id and look it up in your back-end system. If either SKU (e.g. my.sku or my.sku.tv) is associated with the user id, then you grant the customer access to the item.
This approach makes sense, until cross-platform testing reveals that each app returns a different user id for the same customer. This is because user ids are unique to each app.
To work around this problem, you will need to link the purchases to an account that is the same across both platforms. If you have your own account management system, you can ask the customer to create a new account, or login to an existing account. If you do not, then you will need to use an identity management service, such as Login with Amazon (LWA).
Here are the steps the customer has to go through to get the IAP item on both Fire tablet and Fire TV, in the two apps approach.
- Customer purchases IAP item in the Fire tablet app
- Customer clicks on the login button
- Customer enters username
- Customer enters password
- Customer submits credentials and purchase is linked
- Customer opens the Fire TV app
- Customer clicks on the login button
- Customer enters username (using the remote!)
- Customer enters password (using the remote!)
- Customer submits credentials and gets access to their purchase
The best customer experience is now a poor customer experience.
One App Approach
The one app approach can be a universal binary that works on both Fire tablets and Fire TV, or a multi-binary approach, where there are separate binaries for Fire TV and Fire tablets.
The setup for one app is MUCH simpler. Every IAP item and its SKU can be accessed by both binaries, which means you can use the same SKU on both Fire tablet and Fire TV. The customer’s user id is the same on both platforms, so you can link the customer’s purchases to their user id on one device, and restore the purchases when the customer opens the app on a different device.
Here are the steps the customer has to go through to get the IAP item on both Fire tablet and Fire TV, in the one app approach.
- Customer purchases IAP in the Fire tablet app
- Customer opens the Fire TV app and gets access to their purchase automatically
This is a much better experience, as the customer gets what they purchased without having to create a new account or login to an existing account.
This post is part of our new Tips from Solutions Architects series.