I'm accepting Ethereum and Bitcoin payments in an trading site and I persist user balances in a database. I'd like to be able to receive ERC20 tokens too (like Bancor) if possible. I am not creating new token contract, just want to accept them as payment.

As the %90 of the answers on the web, they suggest polling filter event of Transfer(address,address,uint256) using web3.js. Please correct me if I'm wrong, but how will I get corresponding TX of that payment from that event?

ozgur, i am also working for a project like yours and i really wonder if you found a solution for this or not, i tried to find your contact details but there is nothing more than your medium profile could you please leave your email, social media or sth to contact with you?
– önder albayrakMay 5 '18 at 11:51

To accept tokens as payment all you need is an Ethereum account. Tokens can be sent to any address. To receive them, the people who own the tokens simply have to send them in a transaction on the network. I'm assuming that whoever deployed the contract to mint the tokens probably also created a front end user interface for accessing the transferTo() function in their token contract.

So basically if you want to accept tokens as payment, all you have to do is post your Ethereum address and they can be sent. If you want to check how many tokens you have you can use etherscan.io or you can write up some code in Solidity that will check the balance. If the token is ERC20-compliant it will have a function in the contract that you should be able to access that will display tokens for any given address. To access that function you will need the contract ABI from the team who deployed it and then write a bit of Solidity code.

If all you are interested in is accepting a token payment, then the person who has the tokens simply has to send them in a transaction to your account and you will have received them.

The filter stuff would be if you're trying to watch the blockchain for any transfer of the tokens and keep a balance going on your local machine, or using Metamask or something. If you want to persist those balances in a local database, you'll probably have to write up a little bit of Solidity code and then get the contract address and ABI so access it.

What about transaction hash? I certainly need it because my current payment infrastructure depends on TX based validation. I persist them and users must be able to see their "deposit" history.
– OzgurOct 14 '17 at 6:33

Also, please do not suggest me third party services like etherscan.
– OzgurOct 14 '17 at 6:58