{"id":13715162,"url":"https://github.com/SatSale/SatSale","last_synced_at":"2025-05-07T04:30:38.504Z","repository":{"id":37048487,"uuid":"321250796","full_name":"SatSale/SatSale","owner":"SatSale","description":"Lightweight Bitcoin payment processor written in easily deployable Python. Self custody donations and payments on-chain \u0026 Lightning network, directly connected to your own Bitcoin node! No middleman/custodian.","archived":false,"fork":false,"pushed_at":"2024-05-15T04:16:26.000Z","size":2096,"stargazers_count":240,"open_issues_count":36,"forks_count":50,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-14T03:34:24.675Z","etag":null,"topics":["bitcoin","bitcoin-node","bitcoin-payments","donation","donation-button","lightning","lightning-network","payment-processor","woocommerce"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SatSale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-14T06:09:26.000Z","updated_at":"2024-11-03T01:46:57.000Z","dependencies_parsed_at":"2024-04-03T15:47:34.519Z","dependency_job_id":"9612f830-cbf9-49d7-9a6e-c5d848ae8907","html_url":"https://github.com/SatSale/SatSale","commit_stats":null,"previous_names":["nickfarrow/satsale"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatSale%2FSatSale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatSale%2FSatSale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatSale%2FSatSale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatSale%2FSatSale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SatSale","download_url":"https://codeload.github.com/SatSale/SatSale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252813611,"owners_count":21808359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","bitcoin-node","bitcoin-payments","donation","donation-button","lightning","lightning-network","payment-processor","woocommerce"],"created_at":"2024-08-03T00:00:55.129Z","updated_at":"2025-05-07T04:30:37.840Z","avatar_url":"https://github.com/SatSale.png","language":"Python","readme":"# SatSale\n\nSatSale is a lightweight Bitcoin payment processor with the option of connecting to your own Bitcoin node or Lightning network node.\n\n|                                                                                              Donation Page                                                                                              |                                               Payment Page                                               |\n| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------: |\n| [![Donate demo](https://github.com/SatSale/SatSale/assets/24557779/aa8913b4-e9e8-4b3a-a083-7220453ff6bb)](https://try.satsale.org/) \u003cbr /\u003e(Click for donation page demo)\u003cbr /\u003e Initiates payment -----\u003e | ![Payment demo](https://github.com/SatSale/SatSale/assets/24557779/b9fa8d30-f5fe-42f9-9ce7-1678b8007a95) |\n\n- [Features](#features)\n- [Installation (short!)](#installation--short--)\n  - [Install](#install)\n  - [Run SatSale](#run-satsale)\n  - [Embed a Donation Button](#embed-a-donation-button)\n  - [Using HTTPS \u0026 Domains](#using-https---domains)\n  - [Lightning Address](#lightning-address)\n  - [Security](#security)\n  - [Payment Gateway (Woocommerce)](#payment-gateway--woocommerce-)\n- [Updating](#Updating)\n- [Docs](#Docs)\n- [Contributions welcomed](#contributions-welcomed)\n- [Disclaimer](#disclaimer)\n- [Support](#support)\n\n![logo](static/logo.svg)\n\nSatsale can be used as a\n\n1. Donation page and button for your website that you can easily embed/link to anywhere.\n2. Bitcoin payment gateway, including a Woocommerce plugin that easily turns any Wordpress site into a Bitcoin accepting store.\n3. Versatile API and payments platform for both on-chain and lightning payments (supporting both clightning and lnd).\n\nCompared to other Bitcoin payment processors, SatSale is lightweight, easy to install and self-host. SatSale is also a great building block for python lightning applications.\n\nSatSale makes donation buttons simple - an easy copy and paste of the one line HTML iframe into your site.\n\nSatSale can talk to your own Bitcoin node, and **verify payments with your own copy of the blockchain**. Payments go **directly into your wallet with no third party**.\n\n# Features\n\n- Connect SatSale to your node, or you can rely on someone else's with just your extended public key.\n- Supports both clightning and lnd, or you can just use on-chain!\n- Direct peer-to-peer payments without any middleman. No KYC, and greater privacy than donation systems where Bitcoin addresses are reused multiple times.\n- [Lightning Address](https://lightningaddress.com) support (e.g. me@mydomain.com)\n- **Lightweight and highly extendable**, with basic html and css styling and a modular Python backend. Take a [look at the code](satsale.py) or [lnd.py](/node/lnd.py)!\n- Reusable and extendable [API](https://satsale.org/docs.html).\n- No shitcoins. Bitcoin only.\n\n# Installation\n\nClone and install dependencies\n\n```\ngit clone https://github.com/nickfarrow/SatSale\ncd SatSale/\npip3 install -r requirements.txt\n```\n\nYou should run a Bitcoin node, but if you don't or just want to try SatSale, you can simply use the `xpub` payment method (your extended public key is usually found in your Bitcoin wallet info).\n\n## No Bitcoin Node (xpub)\n\nEdit the `config.toml` and replace `payment_methods = [\"bitcoind\"]` with:\n\n```\npayment_methods = [\"xpub\"]\n```\n\nthen edit the xpub configuration:\n\n```\n[xpub]\nxpub = \"xpub...\"\nbip = \"BIP84\"\n```\n\nCurrently supported derivations with `xpub` payment method are [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) (legacy), [BIP84](https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki) (native segwit) and [BIP86](https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki) (taproot).\n\n**You should strongly consider running a node and using it to verify payments rather than trusting block explorers.**.\n\nWhen starting SatSale for this first time you **must** check the address matches one in your wallet to confirm you have used the expected address `bip` and derivation path.\n\n## Connect to your Bitcoin Node (recommended)\n\nEdit the `config.toml` configuration and point to your Bitcoin node:\n\n```toml\n[bitcoind]\nhost = \"127.0.0.1\"\nusername = \"bitcoinrpc\"\npassword = \"rpcpassword\"\nrpcport = \"8332\"\nwallet = \"\"\n```\n\n(You can find these in `~/.bitcoin/bitcoin.conf`).\n\nWhen connecting to a remote node, you will need to connect to the SSH `tunnel_host` for to a node like `\"pi@IP\"`, ensuring you have SSH keys in `~/.ssh/authorized_keys` and `ufw allow 8332` the appropriate ports to connect to your node. Or alternatively, see [tor hidden service](/docs/tor.md).\n\nIf you have a lightning node (lnd or clightning) and want to use lightning network payments, see [Lightning instructions](docs/lightning.md). More [example configs](docs/).\n\n## Run SatSale\n\nRun SatSale with\n\n```\ngunicorn -w 1 -b 0.0.0.0:8000 satsale:app\n```\n\nThat's it! You should now be able to view your SatSale server at `http://YOUR_SERVER_IP:8000/`. If running locally, this will be `127.0.0.1:8000`.\n\nIf running on a Raspberry Pi, you will want to [forward port 8000 in your router settings](https://user-images.githubusercontent.com/24557779/105681219-f0f5fd80-5f44-11eb-942d-b574367a161f.png) so that SatSale is also visible at your external IP address. You might have to allow gunicorn through your firewall with `sudo ufw allow 8000`.\n\nYou will want to run gunicorn with nohup so it continues serving in the background:\n\n```\nnohup gunicorn -w 1 0.0.0.0:8000 satsale:app \u003e log.txt 2\u003e\u00261 \u0026\ntail -f log.txt\n```\n\nTip: you can a particular config file with `gunicorn -w 1 0.0.0.0:8000 satsale:app -- config.toml`\n\n### Embed a Donation Button\n\nNow embed the donation button into your website HTML:\n\n```html\n\u003ciframe\n  src=\"http://YOUR_SERVER_IP:8000/\"\n  style=\"margin: 0 auto;display:block;width:420px;height:460px;border:none;overflow:hidden;\"\n  scrolling=\"no\"\n\u003e\u003c/iframe\u003e\n```\n\nChanging `YOUR_SERVER_IP` to the IP address of the machine you're running SatSale on, node or otherwise. Additionally, you could redirect a domain to that IP and use that instead.\n\n### Using HTTPS \u0026 Domains\n\nPoint a domain to your VPS. You can run SatSale or use NGINX/apache to point to the service. See [HTTPS instructions](docs/HTTPS.md). Embedded iframes are easy if your site only uses HTTP. But if your site uses HTTPS, then you can see your donation button at `http://YOUR_SERVER_IP:8000/` but will not be able to in an embedded iframe. See [HTTPS instructions](docs/HTTPS.md).\n\n### Lightning Address\n\nOnce you have an HTTPS domain pointed at SatSale, in the configuration under a lightning node you can specify a lightning address:\n\n```\n# Lightning Address e.g. name@you.satsale.domain (think this requires https url)\nlightning_address = name@ur.domain.com\nlightning_address_comment = \"Thank you for your support \u003c3\"\n```\n\n### Security\n\nRun SatSale on a separate machine to your node, ensuring your node IP is not exposed.\nWhen possible, host on a machine where your node only has access to a **watch-only** wallet.\nSimilarly, for lightning, use an `invoice.macaroon` not `admin.macaroon` unless required.\n\n### Payment Gateway (Woocommerce)\n\nCurrently we have a plugin for Woocommerce in Wordpress that makes Bitcoin webstores extremely easy, [please click here for installation instructions](docs/woocommerce.md). SatSale acts as a custom payment gateway for Woocommerce via the php plugin found in `/gateways`. We have plans to extend to other web stores in the future.\n\n# Updating\n\nWhen updating we recommend to first backup your config:\n\n```\ncp config.toml bk_config.toml\n\n# (previously)\ncp config.py bk_config.py\n```\n\nthen stash your changes:\n\n```\ngit stash\ngit pull origin master\ngit stash pop\n```\n\nWe're still in early development, so things are changing a lot. You may have to resolve changes or manually migrate to the `.toml` (if you used an earlier version of SatSale with the `.py` config).\n\nYou can also just make commits to your modified fork.\n\n# Docs\n\n- Basic [API docs](https://satsale.org/docs.html)\n- Example [configs, Tor, HTTPS, nginx, etc](docs/)\n\n# Contributions welcomed\n\n### You only need a little python!\n\nThe main code can be found in [satsale.py](satsale.py). The client-side logic for initiating the payment and querying the API sits in [static/satsale.js](static/satsale.js), button appearance in [templates/index.html](templates/index.html), and Woocommerce plugin in [gateways/woo_satsale.php](gateways/woo_satsale.php). Please have ago at implementing some of the things below or in the issues!\n\n![docs/diagram.png](docs/diagram.png)\n\n# Disclaimer\n\nSatSale is in early development. As such, we are not responsible for any loss of funds, vulnerabilities with software, or any other grievances which may arise. Always confirm large payments manually and use cold storage as much as possible.\n\n# Support\n\nPlease consider [supporting me](https://btcpyment.nickfarrow.com) via my own instance of SatSale :). This is my first FOSS project, any support would greatly assist my ability to prioritise SatSale and other areas of Bitcoin. And most importantly, **help us bring non-custodial bitcoin payments to the world**. Please email `baseddepartment@nickfarrow.com`.\n","funding_links":[],"categories":["Python","Self-Hosted Bitcoin Payment Processors"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSatSale%2FSatSale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSatSale%2FSatSale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSatSale%2FSatSale/lists"}