I was looking through the ethereum javascript api and I was wondering if there is way to implement a custom transaction fee?

For an example, if someone send a certain amount of ethereum to another address, can a percentage or a certain amount of that be send to a third party address?

Even if this is possible for a direct transaction via address, can it be done with a QR code as well?

1 Answer 1


Ethereum only allow direct transfer between two accounts. If you want to make transfer to two account at the same time you have to use a contract.

In that case the user will send the payment to the contract, and the contract will split the payment into two transfer one to the fee account, and another to its final destination.

I've seen some business do something similiar to this without contracts. They will generate a unique address, you send the paymento to that address, when it is confirmed they will send the fees to their wallet, and the rest to the provider. This scheme is typical in bitcoin, so they just adapted their workflow to the ethereum case.

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.