I just added a new script to Electrum, named "merchant.py"
It is a daemon that manages payments for a web server. It creates Bitcoin addresses using a master public key (so you do not leave your private keys on the server), detects when payments are received and notifies your web application.
The workflow goes like this:
- the server sends a request to the daemon via POST. the request contains an ID, an amount to be paid, an expiration period.
- the daemon answers with a bitcoin address, where the customer needs to send the coins.
- later, the daemon will send a POST to the webserver, to notify that payment has been received OR that the request has expired
This is, IMO, as simple as it can get.
Since addresses are generated using an Electrum master public key, it is possible to visualize payments in the Electrum client; you will, however, need to manually adjust your "gap limit".
There are a few unfinished things, such as requesting a given number of confirmations, but I thought it would be ok to publish it now.
The script is being used at
https://ecdsa.org