0

As someone more familiar with bitcoin than ethereum I'd like to ask what would be the best way to accept ETH payments as a merchant? With bitcoin I can do following and my question is if it makes sense also with ETH or what needs to be done in a different way?

  1. Generate a new address from seed using BIP44 m/44'/60'/0'/0 (is this standard/supported?)
  2. let the customer send ETH to this address
  3. periodically check blockchain for the address balance
  4. confirm payment if the amount matches

Will the merchant be able to use the seed to collect all the incoming payments and send them to a single address later for example? Would they be able to do it using Metamask, MyEtherWallet or Trezor?

How would this be different with ERC-20 tokens?

Imagine you generated a few addresses (as above) and customers paid USDT - each customer / payment to a new address.

  • Now the addresses only have USDT and no ETH, right?
  • Is ETH in each of the wallets needed to pay for gas to send it from there? Or could you pay the gas from the "shared" HD wallet in any way?
  • Can the merchant make a single transaction collecting all the balances from all the addresses and send it somewhere?
0

I think the question is wide open and I am not sure if I get it right but I will tell you how I think a payment process should work for e-commerce using crypto:

1- You use Metamask's JS to connect to Metamask, same for each wallet. 2- You only use one single ETH address to collect all payments. (Not sure if you really need more than 1 due to your business requirements), I would use 1, and it would be at the exchange, and I should have access to it via API. 3- When you send a transaction using Metamask JS, you get a transaction hash in return.

You use the Transaction Hash to query the Blockchain explorer and you verify the SENDER, the RECEIVER, AMOUNT, etc. You may do this with adaptive time intervals based on the average transaction time. e.g. You retrieve and recalculate the average transaction time, and then you only query the explorer once every N minutes to check for status.

The order goes internally into "Pending Payment Confirmation" until it gets the correct status.

For ERC-20 tokens, such as USDT, you use about the same logic + you register those tokens in JS.

Take a look at Metamasks JS docs: https://docs.metamask.io/guide/sending-transactions.html#example


What I think is the main problem for an e-commerce:

Say a product is $99.. will the client pay $10, $30, $40 etc, in transaction fees? The problem is any transaction using ETH addresses is really expensive.

What might work: When I buy crypto, I usually buy TRX, then I send it to an exchange and that pays only 1TRX, once in the exchange, I trade or convert the TRX to USDT if I want to keep the value stable. I do this manually but I think it is what an actual payment flow should do in order to prevent volatility.

-- Most merchants can't pay their providers in crypto so they need to always send the crypto to a centralized exchange in order to be able to withdraw FIAT.

2
  • If I understand correctly what you say about metamask is about how the CUSTOMER (or the website on the customer's side) sends ETH to a merchant's address. What I'm interested in is how the MERCHANT can generate those addresses that are later displayed to the cutomer. The merchant needs to track which customer paid what amount. – premek.v May 28 at 10:44
  • You say the merchant could use 1 address for all the customers. How would they know if the customer paid already (and which customer)? – premek.v May 28 at 10:46

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.