Take the 2-minute tour ×
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

How can I send bitcoins in my web app without running the daemon on my server? Is there a way to do it? Do third parties allow you to send through them?

share|improve this question
add comment

marked as duplicate by ripper234, Nick ODell, Lohoris, ThePiachu, Highly Irregular Mar 1 '13 at 8:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

Yes this is completely possible. There are services which run fully featured API's that provide almost everything that the client can do.

http://blockchain.info/api

There are other merchant processors which have similar functionality depending on exactly what you want to do also.

share|improve this answer
add comment

If you could somehow track the outputs at your disposal (which you may therefor send in an outgoing transaction you could in fact create a transaction, sign it and submit it to a bitcoind daemon or blockchain.info (via the sendrawtransaction API call) to get it into the network.

Tracking outputs is the sole reason you likely have to run a daemon. Even if you create a single output for 100 BTC and then start creating transactions from that output, by splitting off small amounts and send the change back, it makes the transactions dependent on each other. As soon as a single transaction is not validated (due to a bug, incomplete fees or a double spend), all following transactions will also fail.

Spending bitcoins without being connected to the network overlay is possible, but at some point you'll have to synchronize with the network to ensure the transactions have been accepted and to get fill up the output pool for future spends.

share|improve this answer
add comment

To send bitcoins you need:

  • Private key(s) for the address(es) being spent
  • Transaction hash + index for each transaction previously received to those addresses whose funds will be used for spending in this transaction
  • Bitcoin address(es) to send to, including change address if there will be change.

The Bitcoin.org client does all this elegantly without the user needing to know anything except what address(es) to pay and the amount. To construct a transaction manually means obtaining data from the blockchain, performing a cryptographic signature using the private key, and broadcasting that transaction to peer nodes.

The Raw Transactions API article on the Bitcoin.it Wiki describes this further.

This is done using Javascript code from Brainwallet.org:

Now if you simply need to send from a node that is not on a live connection (but has a current blockchain), you can do this using the Armory client:

Also the Electrum client apparently can be used to provide to you the raw transaction that could then be broadcast to spend a coin. Electrum uses a back-end server that does all the work that the Bitcoin.org client would do in building the transaction.

Once you have a raw transaction to broadcast, you can use the PushTx API on blockchain.info or BrainWallet.org will let you broadcast a transaction as well.

share|improve this answer
add comment

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