3

I'm developing a website that will be accepting BTC as a form of payment.

I (technically) know how to accept payments, I'm currently experimenting with the daemon and the Python-BitcoinRPC library and everything seems to work well.

What I'm asking here is what is, in the opinion of Bitcoins experts, the best way to actually handle the transactions.

I'm currently testing this method:

  • Payment requested
  • Script asks the Bitcoin daemon to generate a new address
  • Show the new address to the user, ask to pay to that address
  • Script monitors the address
  • When the confirmed amount on that address is equal or greater that the amount to pay, mark the transaction as Payed
  • Transfer the amount from the address to another "main" address where all the payments end up

Is this method good and secure? I'm particularly unsure about the last point.

Do you have any experience in this field?

Thank you in advance!

EDIT: I'm having some issues in sending BTC moved to a address from another address in local (without paying fees).

2

Your work flow looks good, you should wait for a sufficient number of confirmations before you transaction is fully accepted. Not sure if you are delivering physical products or digital products, that could impact how many confirms you choose to wait for.

Check out the following RPC API call:

 move <fromaccount> <toaccount> <amount> [minconf=1] [comment]  
 Move from one account in your wallet to another

This will allow you to move funds from one address to another within the same wallet.

  • Thank you for you answer. I just did some tests with that API call, and it seems to to the work. In your opinion, is it better to keep the BTCs on the different addresses or to move them on a single address with the move API call? – Riccardo Bestetti Dec 15 '13 at 15:47
  • 1
    I guess thats up to you and your reasoning behind storing them this way I could see arguments for both options. Doing so may link addresses that you have used to receive coin thus decreasing your (pseudo)anonymity. – Mark S. Dec 15 '13 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.