Android companion app for printing receipts from Blink Bitcoin Terminal.
This app enables thermal receipt printing from Blink Bitcoin Terminal web app. It works with:
- Bitcoinize POS - Built-in thermal printer (via Nyx SDK)
- Generic Bluetooth Thermal Printers - Any ESC/POS compatible printer
The app runs invisibly in the background - no UI switching required!
- Bitcoinize POS (all models with thermal printer)
Works with most ESC/POS compatible Bluetooth printers:
- Netum (PT-210, PT-58DC, etc.)
- MUNBYN (IMP001, etc.)
- GOOJPRT (PT-210, etc.)
- POS-5802, POS-5805
- HOIN HOP-E200
- Milestone MHT-P8001
- Epson TM-series (Bluetooth models)
- And many more...
Download the latest release from the Releases page.
# Clone the repository
git clone https://github.com/pretyflaco/pos-print-companion.git
cd pos-print-companion
# Build debug APK
./gradlew assembleDebug
# APK will be at: app/build/outputs/apk/debug/app-debug.apk- Install the companion app
- That's it! The app auto-connects to the built-in printer.
- Install the companion app
- Pair your Bluetooth printer with your Android device (in Settings → Bluetooth)
- The app will auto-detect paired printers
- Print from Blink Bitcoin Terminal - it will use the first available printer
The app receives print commands via deep links from the web app.
Used when the app creates the receipt layout.
const deepLinkUrl = `blink-pos-companion://print?` +
`app=voucher&` +
`lnurl=${encodeURIComponent(lnurl)}&` +
`voucherPrice=${encodeURIComponent('USD 10.00')}&` +
`voucherAmount=${encodeURIComponent('100000 sats')}&` +
`voucherSecret=${encodeURIComponent('abc123def456')}&` +
`commissionPercentage=${encodeURIComponent('5')}&` +
`identifierCode=${encodeURIComponent('ABCD1234')}&` +
// Optional new fields:
`expiresAt=${encodeURIComponent('1735689600000')}&` + // Unix timestamp ms
`issuedBy=${encodeURIComponent('merchant_username')}&` +
`memo=${encodeURIComponent('Happy Birthday!')}`;
window.location.href = deepLinkUrl;const deepLinkUrl = `blink-pos-companion://print?` +
`app=payment&` + // Optional (payment is the default when app is omitted)
`username=${encodeURIComponent('blink_user')}&` + // Shown as "Merchant:"
`amount=${encodeURIComponent('5,000 sats ($50.00)')}&` + // Combined amount string
`paymentHash=${encodeURIComponent('abc123...')}&` +
`memo=${encodeURIComponent('drinks')}&` + // Optional
`date=${encodeURIComponent('2026-01-05')}&` + // Optional
`time=${encodeURIComponent('11:30 pm')}`; // Optional
window.location.href = deepLinkUrl;The payment receipt layout (both Nyx and Bluetooth):
[Blink logo]
================================
Date: 2026-01-05
Time: 11:30 pm
Merchant: blink_user
Memo: drinks
Amount: 5,000 sats ($50.00)
================================
Payment Hash
787ec76dcafd20c1908eb0936a12f...
Thank You!
================================
Used when the web app builds the complete receipt and sends raw ESC/POS commands. This gives full control over receipt layout without modifying the companion app.
// Build ESC/POS data in web app (using your ESC/POS library)
const escposData = buildReceipt(voucherData); // Returns Uint8Array
// Convert to base64
const base64Data = btoa(String.fromCharCode(...escposData));
// Build deep link
const deepLinkUrl = `blink-pos-companion://print?` +
`version=2&` +
`escpos=${encodeURIComponent(base64Data)}&` +
`printer=nyx`; // or 'bluetooth'
// For specific Bluetooth printer:
const deepLinkUrl = `blink-pos-companion://print?` +
`version=2&` +
`escpos=${encodeURIComponent(base64Data)}&` +
`printer=bluetooth&` +
`address=${encodeURIComponent('AA:BB:CC:DD:EE:FF')}`;
window.location.href = deepLinkUrl;| Parameter | Protocol | Description |
|---|---|---|
version |
V2 | Set to 2 for V2 protocol |
escpos |
V2 | Base64 encoded ESC/POS command bytes |
printer |
V2 | nyx (Bitcoinize) or bluetooth |
address |
V2 | Bluetooth MAC address (optional) |
paper_width |
V2 | Paper width hint: 58 or 80 |
app |
V1 | voucher or omit for payment |
lnurl |
V1 | LNURL for voucher QR code |
voucherPrice |
V1 | Fiat price (e.g., "USD 10.00") |
voucherAmount |
V1 | Sats amount (e.g., "100000 sats") |
voucherSecret |
V1 | 12-char voucher secret |
identifierCode |
V1 | 8-char voucher ID |
commissionPercentage |
V1 | Commission % |
expiresAt |
V1 | Expiry timestamp (ms) |
issuedBy |
V1 | Issuer username |
memo |
V1 | Optional memo text (voucher and payment) |
username |
V1 | Payment merchant username (shown as "Merchant:") |
amount |
V1 | Payment amount (pre-formatted combined string) |
paymentHash |
V1 | Lightning payment hash |
date |
V1 | Payment date (optional, defaults to today) |
time |
V1 | Payment time (optional, defaults to now) |
- Check Bluetooth is enabled on your device
- Ensure printer is paired in Android Settings → Bluetooth
- Printer must be turned on and in range
- Grant Bluetooth permissions when prompted
- Ensure paper is loaded in the printer
- Check Nyx Printer Service is installed (comes pre-installed on Bitcoinize)
- Ensure companion app is installed
- Check the app is set as default for
blink-pos-companion://links - Try reinstalling the companion app
app/src/main/java/com/blink/pos/companion/
├── MainActivity.java # Deep link handler & print orchestrator
├── BluetoothPrinterManager.java # Generic Bluetooth printer support
├── Result.java # Result codes
├── SdkResult.java # Nyx SDK result codes
└── Utils.java # Utility functions
# Debug build
./gradlew assembleDebug
# Release build
./gradlew assembleRelease# Test voucher print (V1)
adb shell am start -a android.intent.action.VIEW \
-d "blink-pos-companion://print?app=voucher&lnurl=LNURL1...&voucherPrice=USD%2010&voucherAmount=10000%20sats&voucherSecret=abc123def456&commissionPercentage=5&identifierCode=ABCD1234"
# Test payment print (V1)
adb shell am start -a android.intent.action.VIEW \
-d "blink-pos-companion://print?username=testuser&amount=50000%20sats&paymentHash=abc123"Pull requests welcome! Please ensure:
- Code follows existing style
- Test on both Bitcoinize POS and generic Bluetooth printer
- Update README if adding new features
MIT License - see LICENSE file
- Based on NyxPrinterClient SDK
- Developed for Blink Bitcoin Terminal