Get notified of incoming Bitcoin transaction, as soon as it broadcasted

4

2

After a few weeks of searching for an answer, I decided to ask here.

I want to accept a Bitcoin payment, to a specific wallet, and immediately, when the user approved the payment, to receive an indication that the payment was made.

The problem is, I don't want to wait until it is verified in a block, which takes around 10 minutes, I need the approval in seconds, not minutes.

How can I receive an indication that a Bitcoin transaction was occured to my wallet, in the last seconds?

Ohad Levi

Posted 2014-02-01T16:02:00.523

Reputation: 43

1The standard Bitcoin client will show pending transactions as soon as they hit the network. There is some risk in accepting a zero confirmation transaction. If this is for a brick and mortar establishment it is not likely that a double spend attack can be performed. However online I would be more conservative. Particularly if the item being sold is not revocable such as a digital download.Mark S. 2014-02-01T19:05:56.320

Welcome to StackExchange, Ohad. I made slight edits to your question, please feel free to correct it, if I changed something so that it doesn't capture your intent.Murch 2014-02-01T20:36:33.027

Related: How do I accept bitcoin payments at a real world store?

Murch 2014-02-01T20:38:34.520

Answers

3

If using the wallet notify option in bitcoin.conf, you can get a notification any time a transaction occurs on the network that matches a bitcoin address in the wallet. To use this, of course, you'll have to keep Bitcoin-QT or bitcoind running at all times.

https://en.bitcoin.it/wiki/Running_Bitcoin

Once you have the transaction id, you'll have to look up the transaction, either at an online service like blockchain.io or use a bitcoind json-rpc command to learn more about the transaction and what action you would like to take.

ChrisW

Posted 2014-02-01T16:02:00.523

Reputation: 840