The documentation for Alexa in-skill purchasing shows some code to check if the user already bought a product.
this.$alexaSkill
.$inSkillPurchase
.getProductByReferenceName(productReferenceName, (error, product) => {
if (error) {
console.log(error);
}
if (product.entitled === 'ENTITLED') {
// user already owns it
} else {
// user does not own it
}
});
Can i use this at any time or only during a purchase/cancel transaction?
IOW: Do i have to store the information about which product(s) a user has bought myself, e.g. in a database or will Amazon provide that information in every request?