I've got an idea for a dApp, but not sure if it's possible or practical. the questions that sound similar that have been answered on here doesn't help with what I'm trying to do, at best, makes it all the more confusing.

I'd like to create my own token and be able to accept it on a website / app where one could spend that specific token, along with some data they'd enter in a text field.

There are not many guides out there that I could find that demonstrate how to accept an ERC20 token with web3.js in a web app. Mostly the tutorials I find are about creating tokens solely for an ico for token swaps. I want to build a web app that accepts them.

Is this possible?

  • When you say your DApp, is it a Contract that's accepting ERC20 token, or just a normal account? If it's a normal account then you don't accept tokens. Users just transfer tokens to you. Commented Nov 14, 2017 at 21:51
  • more so along the lines of using the token as a membership payment. so transferring is probably the better word. web dapp > user sends token along with some text (username) > smart contract takes token and sets and stores usernamevalue
    – totalnoob
    Commented Nov 14, 2017 at 22:18

2 Answers 2


its possible to do it, you need to make your dApp compatible with the Metamask extension

  • so a combination of metamask and a webapp with web3.js? any tutorials you can share? would it be easier with ERC2223?
    – totalnoob
    Commented Nov 14, 2017 at 21:21
  • check links in my answer, in second link you can find Docs on bottom .
    – TahaBA
    Commented Nov 14, 2017 at 21:27
  • thanks. how about the question of creating a smart contract that gets sets a value for text, possible? how to get that optional field into the metamask UI when sending the token?
    – totalnoob
    Commented Nov 14, 2017 at 21:31
  • first Q you can't catch value from text by contract,second Q with your dApp you can make it check if this tokens available in a wallet and get select it to do your operation
    – TahaBA
    Commented Nov 14, 2017 at 21:44
  • is there no way to send text? eg. let's say a user sends one of these tokens through, and I'd want the smart contract to take their text and create a username based off that text
    – totalnoob
    Commented Nov 14, 2017 at 21:53

Now you can use the Ether and ERC20 tokens WooCommerce Payment Gateway plugin to accept Ether and any ERC20 token of your choice: https://wordpress.org/plugins/ether-and-erc20-tokens-woocommerce-payment-gateway/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.