How It Works
TapRails acts as the interoperability bridge between the sender’s mobile app and the merchant’s payment reader.Zero Friction for End Users: Customers simply tap their phone against the merchant’s NFC terminal, review the amount on screen, and confirm. The settlement happens on-chain in seconds.
1. Select Your Payment Mode
TapRails supports two distinct payment execution modes depending on your app architecture:2. High-Level Integration (PaymentFlowManager)
The fastest way to add tap-to-pay is with PaymentFlowManager. It handles NFC scanning, UI transitions, error handling, and receipt generation out of the box.
CustomerPayScreen.tsx
3. Low-Level Integration (useNFCCustomer)
If you want to construct your own custom UI and control the step-by-step state machine, use the useNFCCustomer hook.
CustomTapScreen.tsx
4. Backend Settlement & Webhook Verification
Once the payment is submitted, your server receives real-time notification via thepayment.confirmed webhook. Use this event to update order status, issue reward points, or send a receipt notification to the customer.
server.ts
Web Fallback Experience
If a customer taps an NFC terminal using a phone that does not have your app installed (or on non-integrated devices), TapRails automatically provides a secure Zero-App Web Fallback. The NFC tag directs the customer’s browser to a web checkout page where they can connect any Web3 wallet (via WalletConnect, Coinbase Wallet, etc.) and complete the payment seamlessly.Next Steps
Merchant Acceptance
Learn how to turn Android phones into POS terminals accepting tap-to-pay.
Wallet Integration
Embed gasless session-key tap-to-pay inside self-custody wallets.

