hi how i can add a envato verify purchase for a codeigniter project

hi how i can add a envato verify purchase for a codeigniter project,
when someone buy my project and install its need to verify proches code ,
like themeprota template

1 Like

you have to create your own API token to use it for your project.

1 Like

i know this but i want a example or tutorial ?

Check @baileyherbert (their genius in this space is pretty much unrivalled!) solution How to verify a purchase code using the Envato API


i want something like this :
http://license.mydomain.com/api/check_license_code?license_code=" . $_POST[‘license_code’] . “&domain=” . $current_url

I think when the verification form will submit then the form action page at your project/script you have to integrate the above reply link tutorial code from @baileyherbert and you have to take action according to the tutorial code return value ( json_decode($response) ).

1 Like

I have the same question are you got it?

no bro

Hi @marwaelmanawy and @rmslab!

Please have a look at my post here: How to verify a purchase code using the Envato API

It has all the information you’ll need to verify purchases with the Envato API, including a working example in PHP. You will need to know a little bit of PHP in order to customize it to your needs, though.

Let me know if you have any questions or need help with it!


hi @baileyherbert
Thanks for your comment but that’s not what i asked. I need to force buyer adding his purchase code to complete the installation.

i asked this question because my products is offered as nulled scripts in many website :cry: :cry: :cry:

1 Like

thank you

Pretty sure that’s not allowed under envato licenses but @baileyherbert will know better

It seems you’re looking to add a key gate to your scripts and themes, so users must provide a purchase code before they can start using them.

First, do note that ThemeForest has strict rules on key gates and the way you implement them. Be sure to check those out first: https://help.author.envato.com/hc/en-us/articles/360000481263-WordPress-Theme-General-Requirements#h_724052476231526019180068

Second, I think you should consider how that would work. Your buyers will always have access to your code, so there’s no way to force them; if they don’t want to verify their purchase, they can simply remove that part of your code. Encrypting your code isn’t allowed either, so there’s no way to stop this.

Some authors will instead lock certain features behind a key gate, such as demo content or updates. This is allowed, but you will need to know how to implement this type of system yourself because there’s no out-of-the-box solution for it.

It’s far more complex than simply adding some code to your items. Key gates require you to set up your own API for purchase verification. It typically works like this:

  1. Your buyer enters their purchase code into your theme/script.
  2. The theme/script sends the purchase code to your web server for verification.
  3. Your web server connects to the Envato API, verifies the purchase code, and saves it in a database.
  4. The theme/script sends that code again when requesting updates or demo content from your server. Your server will see the code in the database and recognize that the user is authorized.

My code example will certainly help you with #3, but you will need to write a lot of code yourself.