Bitcoin Forum
July 27, 2026, 07:27:58 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need dev advise : btc payment processing/forwarding with low fees (web-based)  (Read 181 times)
Quker481 (OP)
Newbie
*
Offline

Activity: 4
Merit: 0


View Profile
November 04, 2024, 10:22:56 PM
 #1

Hello guys,

this is my first post and i hope that im in the correct section to ask for some advise.

Im currently in the very early stages of creating a simple PPD (pay per download) site, where a user can basically upload and sell small digital files. I would want to take a small commission of max. 5%.

So the most important part of the website would be to receive the payment from the customer to a newly generated SegWit and forward 95% automatically to the seller and eventually transfer the 5% earning to my personal wallet.

The biggest issues im seing with btc are the fees because when im thinking correctly, than i would have to do 2 transactions on every sale (1tx to to seller and one tx to transfer my 5% commision from the generated address to my personal wallet) or is there any way to avoid this issue?

A possible workaround would be payment processors like coinpayments or blockonomics but i dont have experience if it would work good with the forwarding(twice) after a payment got received.


I personally dont really want a hotwallet or bitcoin node of some sort because the project would be too expensive and i dont want to create weaknesses that can get hacked.

I hope that maybe someone here would have an idea on how to handle the payment situation in my case? How would you do i with without spending too much on fees or even running an own btc node?

Thanks in advance

odolvlobo
Legendary
*
Offline

Activity: 5082
Merit: 3832



View Profile
November 05, 2024, 08:13:02 AM
Merited by ABCbits (1)
 #2

The biggest issues im seing with btc are the fees because when im thinking correctly, than i would have to do 2 transactions on every sale (1tx to to seller and one tx to transfer my 5% commision from the generated address to my personal wallet) or is there any way to avoid this issue?

You can send to multiple addresses in a single transaction.

I personally dont really want a hotwallet or bitcoin node of some sort because the project would be too expensive and i dont want to create weaknesses that can get hacked.

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.


Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
ABCbits
Legendary
*
Offline

Activity: 3682
Merit: 10227



View Profile
November 05, 2024, 08:32:50 AM
 #3

Im currently in the very early stages of creating a simple PPD (pay per download) site, where a user can basically upload and sell small digital files. I would want to take a small commission of max. 5%.

FYI, there are many websites which offer same/similar feature such as SatoshiDisk.

The biggest issues im seing with btc are the fees because when im thinking correctly, than i would have to do 2 transactions on every sale (1tx to to seller and one tx to transfer my 5% commision from the generated address to my personal wallet) or is there any way to avoid this issue?

You can send to multiple addresses in a single transaction.


In addition, it can be used to perform batching transaction when OP's hot wallet receive multiple deposit in short interval.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
garlonicon
Copper Member
Legendary
*
Offline

Activity: 944
Merit: 2323


View Profile
November 05, 2024, 08:41:41 AM
 #4

Quote
The biggest issues im seing with btc are the fees
Fees are paid by the sender. If you are just receiving funds, then you don't have to pay anything.

Quote
i dont want to create weaknesses that can get hacked
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.
ABCbits
Legendary
*
Offline

Activity: 3682
Merit: 10227



View Profile
November 05, 2024, 09:04:56 AM
Merited by garlonicon (1)
 #5

Quote
The biggest issues im seing with btc are the fees
Fees are paid by the sender. If you are just receiving funds, then you don't have to pay anything.

That's true, but OP still need to create TX which send the Bitcoin to seller.

Code:
TX 1
Buyer ---> OP

TX 2
OP ---> Seller
   ---> Change address or other OP's address

Quote
i dont want to create weaknesses that can get hacked
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.

In this case, how would automatic forward to seller works?

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
garlonicon
Copper Member
Legendary
*
Offline

Activity: 944
Merit: 2323


View Profile
November 05, 2024, 09:29:47 AM
Merited by ABCbits (1)
 #6

Quote
In this case, how would automatic forward to seller works?
Just make a single transaction:
Code:
+-------------------------------------+
| Buyer   1.01 BTC -> Seller 0.95 BTC |
|                     OP     0.05 BTC |
+-------------------------------------+
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).
ABCbits
Legendary
*
Offline

Activity: 3682
Merit: 10227



View Profile
November 05, 2024, 09:41:20 AM
Merited by garlonicon (1)
 #7

Quote
In this case, how would automatic forward to seller works?
Just make a single transaction:
Code:
+-------------------------------------+
| Buyer   1.01 BTC -> Seller 0.95 BTC |
|                     OP     0.05 BTC |
+-------------------------------------+
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.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
garlonicon
Copper Member
Legendary
*
Offline

Activity: 944
Merit: 2323


View Profile
November 05, 2024, 10:57:25 AM
Last edit: November 05, 2024, 11:08:29 AM by garlonicon
Merited by ABCbits (2)
 #8

Quote
i never required to send Bitcoin to 2 or more addresses at once
It is possible to allow UTXO picking, and prepare an unsigned transaction for the user. Then, it is only a matter of signing it.

Quote
There's also concern about user friendliness and handling underpay/overpay.
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:
Code:
+------------------------------------+
| OP   1.00 BTC -> OP       1.05 BTC |
|                  Seller   0.95 BTC |
+------------------------------------+
And then, some user can just visit your site later, and complete it, without invalidating prepared signatures:
Code:
+-------------------------------------+
| OP    1.00 BTC -> OP       1.05 BTC |
| Buyer 1.01 BTC    Seller   0.95 BTC |
+-------------------------------------+
Quker481 (OP)
Newbie
*
Offline

Activity: 4
Merit: 0


View Profile
November 05, 2024, 11:17:10 PM
 #9

Helly everyone, thanks alot for all your feedback.


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.

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.

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.

Quote
In this case, how would automatic forward to seller works?
Just make a single transaction:
Code:
+-------------------------------------+
| Buyer   1.01 BTC -> Seller 0.95 BTC |
|                     OP     0.05 BTC |
+-------------------------------------+
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).

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?


Quote
In this case, how would automatic forward to seller works?
Just make a single transaction:
Code:
+-------------------------------------+
| Buyer   1.01 BTC -> Seller 0.95 BTC |
|                     OP     0.05 BTC |
+-------------------------------------+
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.

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



ABCbits
Legendary
*
Offline

Activity: 3682
Merit: 10227



View Profile
November 06, 2024, 08:20:13 AM
 #10

Quote
i never required to send Bitcoin to 2 or more addresses at once
It is possible to allow UTXO picking, and prepare an unsigned transaction for the user. Then, it is only a matter of signing it.
--snip--

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.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!