OK
In my previous apps that use Activity, I put the code in the Starter. I think this can also be used in the main module, but since all my apps today are B4xpages, I can't confirm. But you can test it in both modules.
OK
Check this line
in the library: "Consuming a purchase removes it from the 'purchased' products."
When you use the `consume` method, the user can buy the item again, so you need to change the code to handle this (control the credit of the customer).