electrum-bitcoinprivate/scripts/merchant/merchant.readme

37 lines
1.2 KiB
Plaintext
Raw Normal View History

2012-10-26 05:00:28 -07:00
merchant.py 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 amount to be paid, a number of confirmations, and an
expiration period in hours.
2012-10-26 05:00:28 -07:00
- 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
the payment has been received OR that the request has expired
2012-10-26 05:00:28 -07:00
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".
In order to use this script, first edit and rename
merchant.conf.template to merchant.conf
2013-10-06 12:37:08 -07:00
to launch it, type:
> python merchant.py
In another terminal, you may send a request from the command line (it
will send the request to the running daemon via http). For example,
here is a request for 0.1 bitcoins, that requires two confirmations,
and expires in 120 minutes:
> python merchant.py request 0.1 2 120