Is this actually possible?
Yes. Transactions may have arbitrarily many inputs and outputs (subject to them fitting inside a block, of course). The inputs must be UTXOs that you can provide signatures for (coins you own), and the outputs will be new UTXOs, each of which can be associated with any address(es) you like (that is, the coins you own can be sent to as many addresses as you like).
Is it easy to do?
The reference implementation (Bitcoin Core /
bitcoind) allows you to do this on the command line (that is, with
bitcoin-cli) using its
sendmany command. You can see an example usage of that command in this answer to a similar question.
I'm not aware of any wallets or solutions that make this easy to do via a GUI. Bitcoin Core and Samourai have easy ways to do batch spends. In Bitcoin Core, there is an [Add Recipient] button at the bottom of the "Send" tab. In Samourai, when at the "Send" screen where you would enter the destination address and amount, you can tap the three dots in the upper-right, and then tap [Batch spend].
There must be automated business solutions out there that companies such as exchanges and large merchants are using.
Will it save me lots of money versus making separate Bitcoin transactions for each customer?
That depends on the frequency at which you receive orders and the frequency at which you wish to fulfill those orders. If, say, you're receiving 10 orders per minute, then you could batch 50 orders into one transaction, allowing you to fulfill orders within 5 minutes. If you're only receiving 1 order per minute, then you could only batch 5 orders into one trasaction whilst still fulfilling orders within 5 minutes; to batch 50 transactions, you'd have to wait until you'd received 50 orders, meaning your customers would have to wait up to 50 minutes before you fulfill their particular order.
The average BTC transaction that contains one input (your funds) and two P2PKH outputs (recipient and change) is around 250 bytes. Each additional P2PKH output requires 34 bytes. In this way, assuming a transaction fee of 90 sats/byte:
50 individual transactions with 1 output each would in total cost 1,125,000 sats ≈ 0.011 BTC (≈ 486 USD at time of writing).
1 batch transaction with 50 outputs would only cost 172,440 sats ≈ 0.0017 BTC (≈ 74.50 USD at time of writing).
You can see how this becomes very economical at scale!
Having said all that, in practice this is much less of an issue nowadays because of Layer 2 networks like the Lightning Network. With Lightning, fees average no more than 20 sats per off-chain transaction, and then the resulting balance after many, many Lightning transactions will ultimately be settled on-chain by paying a single BTC transaction fee. Let's say you fund a Lightning channel, perform 50 transactions, and then settle the channel. That's:
- One on-chain transaction of 250 bytes, paying 90 sats/byte, so 22,500 sats.
- 50 Lightning transactions at no more than 20 sats each, so no more than 1,000 sats.
- Another on-chain transaction with another 22,500 sat fee.
So in total, that's 46,000 sats = 0.00046 BTC (≈ 20 USD at time of writing).
In practice, you can expect to perform many more than just 50 transactions with a single Lightning channel, further reducing the effective cost per transaction.