im using btcpay server. It allowed me to insert my xpub (created using elctrum) and generate deposit addresses. Detecting payments using nbxplorer.
Im pretty new to bitcoin, but I think I understand the basic of it. xpub=masterpublic key, xprv=masterprivate key.
So now for receiving payment I use btcpayserver that create millions of deposit addresses from my masterpublic key and directly sync with my elctrum.
now for payment I need to create a new wallet?
First things first, you are right:
xpub = master public key, which can be used to derive deposit addresses
xprv = master private key, which can be used to derive private keys, these private keys can be used to calculate the public key, the public key can be hashed to generate the address
I have never used btcpayserver, but if you created a wallet by entering your xpub, it's a watch-only wallet, so yes, you'll need a different wallet to handle payouts.
What you could do is use the electrum wallet from which you exported the xpub, if it's a "real" wallet (generated from a seed or an xprv), it should keep track of the same addresses as generated by your btcpayserver, so if you run electrum as a daemon, it should be able to function as a hot wallet.
If you run btcpayserver and electrum on the same machine, you might aswell directly import the xprv in btcpayserver? I don't know how safe btcpayserver is since i have never used it tough!