Hey everyone,
this is my first time posting and I hope I’m in the right place for some advice.
I’m in the initial stages of building a simple pay-per-download site where users can upload and sell small digital files. I’m planning to take a small cut of up to 5%.
The key feature of the site would be to accept payments from customers using a newly created SegWit address and then automatically send 95% to the seller, while I would get my 5% fee sent to my personal wallet.
The main problem I see with BTC is the fees. If I’m thinking this through correctly, I’d need to make two transactions for every sale one to send funds to the seller and another to move my 5% commission to my wallet. Is there any way to get around this?
I’ve considered using payment processors like CoinPayments or Blockonomics, but I’m unsure how well they handle the double forwarding after receiving a payment.
I’m not keen on managing a hot wallet or running a Bitcoin node since that would make the project more costly and potentially open up security risks.
I’d really appreciate any ideas on how to tackle the payment issue in my situation. How would you handle it without racking up too many fees or needing your own BTC node?
Thanks a lot!
You can send to multiple addresses in a single transaction.
If you don't want to run a node or have a hot wallet, then your only choice is to go with a payment processor such as Bitpay or Coinbase.
FYI, there are many websites which offer same/similar feature such as SatoshiDisk.
In addition, it can be used to perform batching transaction when OP's hot wallet receive multiple deposit in short interval.
Fees are paid by the sender. If you are just receiving funds, then you don't have to pay anything.
You don't have to store any private keys on your server. First, you generate your seed on your own computer, and then, you upload only the master public key to the server. Then, the only thing a hacker can do, is to compromise your privacy in the worst case, by getting the full list of addresses. But: it will never get your private keys, if they will not be available online.
Just make a single transaction:
Getting a single confirmation can unlock the link to download the content.
Or, even better: it is possible to allow downloading everything in encrypted form first, and broadcast the decryption key, after reaching a single confirmation. And everything can be just encrypted by OP's public key (so it would be possible to prove in a SCIP way if needed, that this very key can decrypt it).
It's valid approach. But from my experience paying for goods/services, i never required to send Bitcoin to 2 or more addresses at once. There's also concern about user friendliness and handling underpay/overpay.
It is possible to allow UTXO picking, and prepare an unsigned transaction for the user. Then, it is only a matter of signing it.
1. Pick your UTXOs.
2. Copy-paste an unsigned transaction.
3. Broadcast it to the network.
You won't underpay/overpay, if you will receive already prepared unsigned transaction, where you can check everything, in a similar way, as it is displayed by block explorers.
Edit: Also, in case of unsigned transactions, it is possible to prepare partially signed transaction upfront, and accumulate dust in a safe way. For example:
1. You have many UTXOs, which you want to combine into a single one.
2. You sign each UTXO with SIGHASH_ANYONECANPAY, and put a negative fee, by picking some of your prices.
3. You upload your transactions to your server.
4. Later, some user visits your site, and picks a new UTXO.
5. You will give him a transaction, which will allow receiving a payment, and accumulating dust, at the same time.
For example, you start with uploading this signed transaction:
And then, some user can just visit your site later, and complete it, without invalidating prepared signatures:
Helly everyone, thanks alot for all your feedback.
Other thing i should mention is that im not a web dev but rather a web designer, so i would need to find a freelancer, thats why i would also think that payment processor like bitpay or coinpayments(.net) are a good option too because i dont want to rely on the programming skills of a random freelancer to keep my funds safe. Those processors would charge around 1% comission too but i guess this would be the more safer but less customizable choice.
When im correct the payment processore like bitpay etc. would create a new segwit address for every order and i should be possible for me to transfer out all the small commissions (after i made a few sales) from all the wallets into one single single tx (so that i only bay a tx fee once instead of one time per address). Am i correct here?
I also have to calculate this whole matter further because its also very hard to run such a ppd service with bitcoin without a minimum Sales price for the seller. When i would need a make more than 1 tx for a sale with a price of 5USD (set from seller) than every (cheap) item listed would look like a ripoff because i would have to calculate my losses from fees into every order. I also want to serve people who are not selling expensive stuff.
thanks alot for the input. Would definitely be a cool idea with the early downloads but how exactly would you continue in my case from a programming standpoint?
Confirming/tracking a new incoming tx and showing the user/buyer a download link afterwards would be relatively easy with premade payment processors like bitpay or coinpaymentsDotNet etc or would you always go with a integration of electrum to the server or hosting an own bitcoin node or anythign like that?
Youre right, of course the user/buyer just needs to make one tx to buy something. The second tx where i move my commission to my personal wallet also doesnt need to be automatical.
I think it would be best, if i wait untill i collects a few dollar in total on multiple addresses so that i can combine everything into 1 tx when im moving it to my personal wallet - so that i dont wipe out 50% of a wallet's balance when my commission was very small for that particular sale.
And my apologies for all the typos and noob questions i put into this reply
On theory, it's good. But in practice,
1. Only some wallet support PSBT or similar mechanism.
2. Few crap wallet doesn't have feature send to multiple address in an TX.
There's reason why PayJoin (which pose few similarity with your idea) still not popular.