Development of ethereum payments system

Hello everyone,
I’m in need of some help!

I’m developing a project where I’m supposed to implement an ethereum payment system that will then be installed in a point of sale (POS) in a retail store.
The idea is not to use any gateway available in the market, so I need to understand what would be the best way to develop the whole system. I have already investigated and found that smart contracts and the web3js library could be an option:

  1. The merchant creates a smart contract with the value and inserts it into the blockchain.
  2. The POS shows a QR Code with the data needed for the payment
  3. The customer reads the QR Code through his wallet and executes the payment
  4. The amount is entered into the contract
  5. The merchant withdraws the contract value to your wallet

I would like to know if you find this option workable and if it would be successful. I am available for any new ideas!

Thank you!
Maria Afonso