Verify purchase in Javascript

Hi guys. I’m interested in creating a Photoshop plugin and before offering its full features I’d like to have the user login (in the same html panel) and his purchase verified. I’m thinking pasting a purchase code wouldn’t prevent someone with bad intentions from distributing the plugin with the purchase code as well.

How would you do this? Would you do it differently? Security would not be a problem since js code would be transformed into binary.

Hi @Artorius,

There are a couple of ways to deal with this:

  1. Use the Envato API, authenticating with the Oauth flow. The end user will have to login to our API with their credentials, and you can verify that that purchase code belongs to the specific user’s account.

  2. You can also host an API on servers you control, and then call the Envato API and perform the validation there (having the Photoshop plugin call your API).

The short answer is that a purchase code alone is not enough to validate the plugin; our API methods validate the buyer or seller of that purchase code as well.

3 Likes