There is no barcode scanning in QuickBooks Online
This is only available using QuickBooks Point of Sales and QuickBooks Enterprise inventory solution. If you are in need of a scanner, seems like you are in a retail sales environment. Even if you get this to work, the latency will turn into an issue. Inventory adjustment will only be available in QBO Advance which subscription tag by the time of the end of a year, you will had paid in full a perpetual POS license with the full retail store capabilities.
There are a number of virtual POS out there that sales you the scanner, but will offer no financial accounting. Only QB POS is fully interactable with your QB financial. The new version of QB POS has great features that sync with your E-Commerce website.
Wireless Sync to QuickBooks Online with POS
There is an option to syn inventory scanned with a barcode scanning using an Point of Sale from QuickBooks. The new version 19 provides a syncronization process. This option links your POS and QB Online. Anything scanned in the POS will be available in QB Online.
But this option has a price tag. First, yo need to get a QB POS licence , hardware for your point of sale and scanner. Following this , yo need a E-Commerce website with full inventory functionality. Using an available Connector will synchronize your orders with your online shopping cart, QB Online and the POS.