How to verify a purchase code using the Envato API

Hi, the method doesn’t work no more. There is not "View the user’s items’ sales history” for personal token:

Also if you go to and generate the token, the scope is converted to YOUR purchase not the user’s one.

Anyone know another method?

Thank you!

Hey @Schiocco - The wording for permissions is a little different if you edit them. When editing an existing token, you want to select “View your items’ sales history”, which is selected in your screenshot. It will still work as normal.

Basically, “View your items’ sales history” and “View the user’s items’ sales history” are identical, so whichever one you see works fine. :slight_smile:

1 Like

I’m a bit confused about this API closure. If this is the api being closed, then why does the documention on still show ‘…’ in most of their examples. If we can’t use this API URL anymore, it would be really helpful for some relevant examples.

I haven’t done much with the API before, but now I’m in a bind because a plugin I rely on is using this URL to verify purchases.

Hi @bolderelements,

Sorry for any confusion! I was referring to the old API at - not sure if the post above was edited or if I saw him using it somewhere else, but that’s what is being removed/shut down (in March). is the proper API.

Oh good, thank you! So happy to know the plugin should continue working then… It’s no longer supported so I was trying to figure it out on my own. Whew! Some day when I have more time I’ll have to learn it for myself :slight_smile:

1 Like

Is there any dummy purchase code for testing my envato purchase code validation? Stripe API has test card number 4242 4242 4242 4242. I am searching for dummy envato purchase code for testing purpose.

No there is no way to test it now, you will just have to wing it and ask your customer for a purchase key.

Very, very high chance your account will soon be disabled if you do that. My suggestion is to ask a customer for a purchase code when they have a support inquiry and then you can do all the tests you want. There are tons of verifications mechanisms in place to avoid self purchases and gaming the system. If you get caught self purchasing you will be disabled, no questions asked. I strongly urge you not to self-purchase / self-rate, etc.


Oh thank you so much for this input, i only assumed that with no means of testing the api, we would be left off with no other option. But cheers for letting me know.

I understand, but considering you’re bound to get a support question, it’s safer to ask for the purchase code for confirmation and do it through “fair-play” methods rather than purchasing your own file! Cheers! :slight_smile:

1 Like

Hello all.
You can’t purchase your own item if you are logged in into the same account.
What you can do however, it’s lower the price of your item to a minimal, and ask a friend of your to buy it, just to get a purchase code and do your tests.
This way you won’t do anything illegal, and you won’t have to ask your customers for a purchase key, because let’s face it, that is not very professional, is it? :slight_smile:

PS. If anyone is looking for a working PHP script to validate your customers purchase codes, you can try this one.

I am using it and it’s working fine, you just need to create and register an API here and replace the XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX with your bearer from the API you just created.

Same thing. You still have a very high chance of being disabled for this. Terms Here

When determining whether misleading pricing has occurred, we may consider any evidence that the advertised price is not reflective of the actual intended sale price, including (but not limited to):

  • The usual/reasonable pricing for similar items of that type within the broader industry;
  • Whether the author has made any sales at the advertised price (or at any price close to that price); or
  • Whether the author has been observed to temporarily lower the price in response to a sales inquiry from a customer

You are NOT ALLOWED to self purchase, reduce the price to self purchase, ask a friend to “purchase for a lower price” absolutely ANY tactic where you artificially inflate your sale count regardless of the excuse.

If a friend purchases a full price, doesn’t rate or doesn’t ask for a refund in the future for bogus reasons, all is well, although if that IP can be linked back to your account, you both risk being disabled.

Play fair. Ask your first buyer for a purchase code or contact Envato Authors Help and Support for more details on the matter.

Please be very careful on these matters. ANY attempt to game the system or artificially bump sales that is detected will result in your account being disabled without warning.

Yes you are absolutely right, but as you say, as long as your friend doesn’t ask for a refund, this would count as a regular sale, and it’s not like you are trying to scam anyone.

And I don’t think that asking a customer for the purchase code it’s a good technique, to be fair I think Envato should provide some test codes for authors, to avoid this kind of situations.

Actually, been doing it for over 11 years for those who contact me directly via email, and for others I have my own scripts in place to check. How else am I suppose to prove ownership? Everyone has some sort of code like this (i.e. PayPal one time passcode when talking to support)

And if you don’t want to ask for a purchase code, simple, ask them to send you a message via your Envato Contact form, where the purchase can easily be verified.

Indeed it’s a regular sale, but if your friend has the ability to access your account from the same machine for example, that will trigger a lot of problems. It can be interpreted as a self-purchase.

Heya @crispyApp,

Apologies, I was away for the last few weeks.

I would recommend taking a few minutes to set up your own dummy API. You can copy/paste the example responses in my first post at the top of this thread, and write a small script to return one or the other based on the input. That’s what I do for my own projects. :slight_smile:

Once your application works with the dummy script, it should work with the real API. Just give it a fake purchase code and make sure you’re getting a 404 back so you know there aren’t any authentication issues.

Edit: Here’s an example:



Hello guys. Thank you for useful information. But I am also trying to verify theme purchase code plz can anyone help me?

Hello! I am .net developer. Please provide me c# code for verify purchase. I need your help, help me please…

Aspx C# code for Purchase verification?

Hey, you can use Easy Envato to verify your purchase codes

The extension can be used on all major chromium-based browsers, including New Edge, Opera, Google Chrome.

Available on Chrome Web Store

Github Repository

Can someone recommend Envato purchase code verification script which performs some level of caching on the data to limit the number of API calls? The support team says Envato’s started looking more closely at their API traffic to ensure they can maintain a better service.