Skip to content

Implement NFC Tap-to-Pay for Lightning Payments #426

@GhanshyamJha05

Description

@GhanshyamJha05

Summary

Alby Go currently supports QR code-based Lightning payments, which are great for digital interactions but less ideal for in-person transactions (e.g., at merchants). This feature request proposes adding NFC (Near Field Communication) support to enable "tap-to-pay" functionality, allowing users to pay Lightning invoices by tapping their phone against an NFC-enabled terminal or device.

Motivation

  • User Experience: Tap-to-pay makes Lightning payments as seamless as traditional contactless cards, reducing friction for everyday use and merchant adoption.
  • Bitcoin Adoption: Aligns with Summer of Bitcoin goals by making Bitcoin/Lightning more accessible for real-world transactions, bridging the gap between digital and physical commerce.
  • Differentiation: NFC is rare in open-source Lightning wallets, positioning Alby Go as a leader in mobile payment innovation.
  • Ecosystem Impact: Enhances NWC compatibility and could inspire similar features in other Alby tools.

Proposed Implementation

  1. NFC Integration:

    • Use react-native-nfc-manager to detect and read/write NFC tags containing BOLT11-encoded Lightning invoices.
    • Handle NFC events in the app (e.g., on tag discovery, parse the invoice data).
  2. Payment Flow:

    • Detect NFC tap → Extract and validate invoice (amount, expiry, payee).
    • Route to existing send confirmation screen with biometric auth option.
    • Provide haptic feedback and UI updates for success/failure.
    • Add user preferences (enable/disable NFC in settings).
  3. Security & Compatibility:

    • Ensure no sensitive wallet data is transmitted via NFC (only invoice details).
    • Prioritize Android support (iOS NFC is more restricted); test with common terminals/wallets.
    • Follow Lightning standards for invoice encoding/decoding.
  4. UI/UX Enhancements:

    • Add NFC toggle in settings screen.
    • Update send/receive screens with NFC availability indicators.
    • Include onboarding tips (e.g., "Tap your phone to pay").
  5. Testing & Documentation:

    • Unit tests for NFC parsing and invoice validation.
    • Integration tests with mock NFC hardware.
    • End-to-end tests on physical devices.
    • Update README with NFC setup instructions.

Technical Scope

  • Complexity: Medium-high (hardware integration, protocol handling, UI updates).
  • Dependencies: Add react-native-nfc-manager and related Expo plugins.
  • Estimated Effort: 8-12 weeks for a skilled React Native developer.
  • Milestones: NFC setup → Basic tap detection → Full payment flow → Testing/polish.

Acceptance Criteria

  • Users can tap to pay Lightning invoices via NFC.
  • Secure, reliable, and compatible with existing Alby Go features.
  • Comprehensive tests and documentation.

This would be a self-contained, impactful feature that advances Alby Go's usability without disrupting core functionality. Happy to discuss implementation details or refinements!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions