bitcoin payment has big fees I am using the bitcoin-rpc and everytime i create an invoice from a PHP script, i create a new address. All is ok, i get the money after, i have a script that checks number of confirmations, then when i try to send my money back to another wallet i see 300 400 usd in fees
bitcoin-cli sendtoaddress &quot;MY_BIG_WALLET&quot; 0.1 &quot;&quot; &quot;&quot; true
When i look on blockchain i see that that everything were sent from every address that i have created
ADDRESS1 ... 0.06
ADDRESS2 ... 0.03
ADDRESS2 ... 0.078
... and so on
Fees are way to big ... How can i send everything from one big address and pay only 20$ usd fee [the default bitcoin fee, i see on some services, 5 usd]?
I believe i pay per vbyte ... but i want to send internally with low or no fees or something.
How big payment gateways like coingate/coinpayments/bitpay are doing this? They too create an adress for every transaction ...
Thank you.
Fees are way to big ... How can i send everything from one big address and pay only 20$ usd fee [the default bitcoin fee, i see on some services, 5 usd]?

To spend from a bigger amount instead of several small, you must have it. If you fragment your bitcoin holdings sending small amount (for testing purpose or any other reason) to your other addresses, then when you would send it further, you should bind several of them, taking up more space on the blockchain and consequently paying higher fee.
You choose the fee amount, maybe you overpay it ... anyway there is many factor that are involved in fee calculation so there is many ways to minimizing them, you can start here: https://en.bitcoin.it/wiki/Techniques_to_reduce_transaction_fees


I believe i pay per vbyte ... but i want to send internally with low or no fees or something.

There is not &quot;send internally&quot;: either you can use Bitcoin testnet, that works with valueless testbitcoin you can have for free, or you use mainnet and your transactions pay as any other.

How big payment gateways like coingate/coinpayments/bitpay are doing this? They too create an address for every transaction ...

When payment gateways make payments, they aggregate them: they aggregate multiple inputs (customer deposits) with multiple output (customer withdrawals) in a single big transaction that pay a very big fee, but which is always lower than they would pay with many small transactions; moreover they collecting 5$ you say from any single customer that is paid with the big transaction (and some service also from customers who deposit).