Tutorial to subscribe to ERC20 Token deposits of an Ethereum address
You need basic knowledge of how to code with PHP (or know someone who can), you can also learn it at Codecademy.
1. Create a Chaingateway.io account (if you don't have one already).
2. Install the PHP 7 modules JSON and CURL. If you are on a Linux Debian/Ubuntu machine, you can use the following commands:
apt-get install php7-curl
apt-get install php7-json
Depending on your machine and PHP version, you might try the following instead:
apt-get install php-curl
apt-get install php-json
Now restart Apache with:
service apache2 restart
3. Create a folder with a secure name on your web server. For example B5tN-KtfOTf37 (Please use something own).
4. Now download the file named
5. Upload the created PHP script to the created folder on your web server.
6. Create a file named
ipnlog.txtand upload it to the same folder and give the file write permissions. The script above will log all deposits to the ipnlog.txt file. You can process deposits the way you want of course (Example: Update user balances, Mark orders as paid, ...).
You can also send mails on every deposit (to you or your client). For this, we recommend using Elastic Email who offer a great API, tracking, reliability and pricing. By using this link you can save 50%.
7. Now download the file named
8. Replace YOURAPIKEY in the above code with the API Key in your Account panel.
9. Replace the other variables in the upper section of the code above with your data
10. Upload the created PHP script to your web server
11. Call the script in your browser. For example, if you upload it to the root directory of your website, you can call it by typing yourwebsite.com/createsubscription.php
12. After a few seconds, the script will return a status showing if the request was successful.
13. Congratulations! You just created an address subscription and will receive notifications on future deposits to the provided url.
14. If you want to create an ethereum address you can use to send Ethereum or Tokens from, check out this tutorial.