Bittery - better Bitcoin payments
Start accepting quick and cheap Bitcoin payments (and micropayments) with Lightning Network in 5 minutes. Bitcoin payment widgets, PDF invoices. Lightning Network infrastructure provider and management.
Bittery - Better Bitcoin Payments
Start accepting quick and cheap Bitcoin payments (and micropayments) with Lightning Network in 5 minutes. Bitcoin payment widgets, PDF invoices. Lightning Network infrastructure provider and management.
Bittery.io overview video
Platform overview
Bittery is Bitcoin payments platform dedicated to anyone who wants to accept Bitcoin payments, including cheap, instant, Lightning Network based micro-payments. Bittery allows to create QR code payment widgets (accessible through web URL) based on which it is possible for users to pay for the service by standard Bitcoin transaction (on-chain) or using Lightning Network (off-chain). There is also possibility to generate PDF invoices with payment details.
Bittery features as a Bitcoin infrastructure provider service includes:
- create & host your own Lightning Network node – including LN node management features (direct connection to node from e.g. Lightning wallet)
- create Bitcoin shareable payment widgets URLs – accepting standard on-chain transaction or Lightning Network based micro-payments. Users visiting the payment URL can preview payment widget and pay. Payments are defined with FIAT currency, converted to BTC based on current market price.
- create Bitcoin payment PDF invoices – PDF document with all service/product description and payment details
- payments dashaboard – payments analytics, diagrams, status, history, etc.
Business idea
Bittery idea was to create possibility to accept Bitcoin payments for e-commerce, creators and simply anyone who would like to accept Bitcoin payments. The core functionality was built around Lightning Network based micro-payments, which are cheap and almost instant. Backend integration with various e-commerce platforms were planned to be Bittery market advantage. Desktop/mobile support would allow to use Bittery in shops or restaurant where payments widgets would be simply showed on mobile devices like smartphones – and be scanned by customers mobile wallets.
Bittery business plan was to have 0% transaction fee, what is uncommon on the market. Users were going to pay monthly subscription fee for the service what includes all the platform payment-features and Lightning Network infrastructure access, operated by Bittery (including access to user’s personal Lightning Network node instance). Accepting on-chain transaction was going to be free.
With enough partners accepting Bitcoin payments with Bittery – it would be sufficient and attractive for users (customers) to have just single Lightning channel with Bittery nodes because of the routing to partners nodes done by Bittery LN infrastructure. Simply: anyone who would have payment channel with Bittery would pay with Lightning to every Bittery partner. It was network-effect building strategy.
Bittery as Lightning Network infrastructure provider was going to provide liquidity (payment channels) required to operate LN micro-payments.
2 subscription plans differ in some details related to technical possibilities of hosted LN node:
Technical overview
Bittery uses BTCPay Server – open source Bitcoin payments processor. As BTCPay Server is dedicated to self-hosted, personal usage, Bittery as a SAAS product integrates with BTCPay backend components for creating and managing Bitcoin payment widgets. In other words, Bittery relies on self-hosted BTCPay Server infrastructure customized to operate multiple users and payment-accepting accounts.
Bittery UI is implemented with Vue.js being desktop and mobile ready. Backend service implemented in Node.js based on Express.js with PostgreSQL as database. Client-backend communication based on REST API.
Users can initiate custom, personal Lightning Network node (LN node) instance for accepting Lightning payments directly to their node. LND by Lightning Labs was chosen as Lightning Network node implementation. Bittery is backend-integrated with Digital Ocean – cloud infrastructure provider. Every LND instance is a custom droplet provisioned when user initializes custom LN node creation. Because user’s LN nodes are public, they require public IP and every Digital Ocean droplet has a dedicated public IP. Every LN node is connected to single, global Bitcoin full node instance. Using Bittery interface, users can configure their node properties (e.g. set RPC access password). Provisioning process configures LND instances, generates macaroon, sets IP address, etc. At the end LN node is integrated with Bittery backend BTCPay service and it is possible to generate payment widgets through Bittery UI. Every LN node comes with access to personal Ride The Lightning (RTL) app – LN node management tool.
It is possible also to use custom node with Bittery – it’s required to provide node RPC address and macaroon file.
Bittery has a built in subscription service where it’s possible for users to choose subscription plan (with LN node hosting). Users can pay for the service using Bitcoin.
Bittery infrastructure is completely Dockerized. docker-compose setup is MVP-production ready.
Bittery has complete sign-up (registration), sign-in (login process), and reset password including rich client side validation and account e-mail confirmation (integration with Mailgun).
Bittery technical complexity is mostly related to integration with BTCPay Server which initially had no API so integration was based on Puppeteer which was later replaced with Greenfield API. Lightning Network node provisioning process based on integration with Digital Ocean was also challenging due to required configuration of newly created Linux instance with LND setup – everything with single user click.
Technologies
Node.js
PostgreSQL
Vue.js
Quasar Framework
BTCPay Server
LND - Lightning Network Node by Lightning Labs
Bitcoin Core full node
Ride The Lightning (RTL) - LN node management tool
Digital Ocean
Docker
Docker Compose
Technology stack
Components
- bittery-backend – bittery backend service
- BTCPay Server
-
nbxplorer (part of BTCPay infrastructure)
- PostgreSQL – backend DB
- Nginx
- Wordpress – for home page hosting
- MySQL – Wordpress database
- Bitcoin Core – Bitcoin full node implementation
- LND – on every Digital Ocean droplet (1 droplet per 1 user)
- RTL – on every Digital Ocean droplet
Backend service technology stack
Node.js version: Node.js 16.5.0
- axios (0.21.4): Promise-based HTTP client for Node.js.
- bcrypt (5.0.1): Library to hash and compare passwords securely.
- body-parser (1.19.0): Node.js body parsing middleware.
- btcpay-greenfield-node-client (1.7.0): BTCPay Server Greenfield API Node.js client.
- class-transformer (0.3.1): Decorator-based transformation library.
- class-validator (0.12.2): Decorator-based property validation for classes.
- cookie (0.4.1): Cookie parsing and serialization library.
- dayjs (1.8.29): Fast and tiny date-time library.
- eslint-config-airbnb-typescript (14.0.0): Airbnb’s ESLint config with TypeScript support.
- express (4.17.1): Web framework for Node.js.
- form-data (3.0.1): A library to create readable “multipart/form-data” streams.
- jsonwebtoken (8.5.1): JSON Web Token implementation for Node.js.
- lndconnect (0.2.10): Library to generate LND connection strings.
- macaroon (3.0.4): Macaroon library for Node.js.
- mailgun-js (0.22.0): Mailgun API client for Node.js.
- md5 (2.3.0): MD5 hashing library.
- multer (1.4.2): Middleware for handling multipart/form-data.
- node-schedule (2.0.0): Node.js library for scheduling tasks.
- node-ssh (12.0.0): SSH2 implementation for Node.js.
- pdfjs (2.4.5): PDF document parsing library.
- pg (8.3.0): PostgreSQL client for Node.js.
- recaptcha2 (1.3.3): reCAPTCHA library for Node.js.
- reflect-metadata (0.1.13): TypeScript decorator metadata reflection library.
- routing-controllers (0.9.0-alpha.6): Library for building Node.js server applications.
- set-cookie-parser (2.4.5): Cookie parser for Node.js.
- ts-node (10.2.1): TypeScript execution and REPL for Node.js.
- ts-replace-all (1.0.0): TypeScript utility to replace all occurrences in a string.
- typescript (4.4.3): TypeScript language server and compiler.
- uuid (8.1.0): UUID generator library.
- winston (3.3.3): Logging library for Node.js.
- winston-daily-rotate-file (4.5.0): Winston transport for daily rotated log files.
- db-migrate (0.11.11): Database migration framework for Node.js applications.
- db-migrate-pg (1.2.2): PostgreSQL driver for the db-migrate framework.
- eslint (7.32.0): Pluggable JavaScript linter.
- eslint-plugin-import (2.24.0): ESLint plugin for linting import/export syntax and usage
Client (frontend) technology stack
Node.js version: Node.js 14.5.5
- aes-js (3.1.2): Library for AES encryption and decryption.
- apexcharts (3.27.3): Interactive charts and graphs library.
- axios (0.18.1): Promise-based HTTP client for Node.js.
- bip39 (3.0.3): BIP-39 mnemonic code for generating deterministic keys.
- bip84 (0.2.4): BIP-84 library for Bitcoin wallet addresses.
- countup.js (2.0.7): Library for animating numerical values.
- dayjs (1.10.4): Fast and tiny date-time library.
- dexie (3.0.3): IndexedDB wrapper library.
- file-saver (2.0.5): File saving library for the browser.
- jquery (3.5.1): JavaScript library for DOM manipulation.
- js-sha256 (0.9.0): SHA-256 hashing library for JavaScript.
- jsonwebtoken (8.5.1): JSON Web Token implementation for Node.js.
- jszip (3.6.0): Library for creating, reading, and editing ZIP files.
- lndconnect (0.2.10): Library to generate LND connection strings.
- pdfjs (2.4.2): PDF document parsing library.
- pouchdb (7.2.2): NoSQL database for the browser.
- pouchdb-find (7.2.2): PouchDB plugin for advanced querying.
- qrcode (1.4.4): QR code generator library.
- quasar (1.15.2): Vue.js framework with a set of UI components.
- recaptcha2 (1.3.3): reCAPTCHA library for Node.js.
- remove (0.1.5): Library for recursively deleting files and directories.
- sha256 (0.2.0): SHA-256 hashing library.
- uuid (8.3.2): UUID generator library.
- vue-apexcharts (1.6.2): Vue.js wrapper for ApexCharts.
- vue-form (4.10.3): Vue.js form validation library.
- vue-i18n (8.22.4): Internationalization plugin for Vue.js.
- vue-pdf (4.2.0): PDF viewer component for Vue.js.
- vue-sticky (3.3.4): Vue.js directive for sticky elements.
- babel-eslint (10.0.1): Custom parser for Babel to use with ESLint.
- eslint (6.8.0): Pluggable JavaScript linter.
- eslint-config-airbnb-base (14.2.1): Airbnb’s ESLint config for base rules.
- eslint-loader (3.0.3): ESLint loader for webpack.
- eslint-plugin-import (2.22.1): ESLint plugin for linting import/export syntax and usage.
- eslint-plugin-vue (6.1.2): ESLint plugin for Vue.js linting.
Gallery
Project status
Project is already suspended. It had ~300 registrations (not paid), but unfortunately due to technical complexity and formal requirements and regulations related with cryptocurrency processing (KYC, AML) it was too expensive to operate.