Can we debit the wallet of a user on a blockchain without its validation each time.

For example, I can take a subscription on a site with my credit card and they debit an amount at the end of the month without that I have to validate these transactions. Is there a way to debit a user's wallet on a blockchain by using the smart contract.

Thanks already for your answers.

  • Are you talking about debit ethereum or erc20 token from the users wallet? – Meet Siraja Jul 19 '19 at 9:43

If you are talking about Ethers then that's not possible. There is no way to approve a withdrawal directly from a wallet.

What you can do is use a "banking"/escrow contract which stores your Ethers and to which you can give certain allowances. According to these allowances the contract allows withdrawal of your Ethers.

If you mean with Erc20 tokens it's easier. Erc20 supports such approval pattern with the approve function. When you add an approval for a certain address for a certain amount the address can then withdraw your tokens until the amount limit is reached.

| improve this answer | |
  • Of course Lauri Peltonen, i am talking about ERC token. In fact, i am working on a project and i want to set up a private blockchain for electric vehicle charging payment. Each charging station will be considered as a node of the network. All subscribers of the network will have an account and those wiil be credited with an ERC token that I will have to implement. – Mongetro Goint Jul 19 '19 at 12:39
  • The goal is, firstly, to find a way for users to buy the token defined to credit their account for paying the energy. Secondly, to be able to debit the user's account according to the amount of energy consumed automatically, at the end of the month for example, without the user will not need to validate the pay. – Mongetro Goint Jul 19 '19 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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