go icon indicating copy to clipboard operation
go copied to clipboard

Implement NFC Tap-to-Pay for Lightning Payments

Open GhanshyamJha05 opened this issue 10 months ago • 3 comments

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!

GhanshyamJha05 avatar Jan 09 '26 09:01 GhanshyamJha05

I would like to work on this please assign it to me

GhanshyamJha05 avatar Jan 09 '26 09:01 GhanshyamJha05

@GhanshyamJha05 thanks for the PR. I marked it to be reviewed for 2.1.0 CC @im-adithya

rolznz avatar Jan 16 '26 09:01 rolznz

Thanks

GhanshyamJha05 avatar Jan 16 '26 10:01 GhanshyamJha05