- Status: Accepted
- Date: 2026-06-19
- Related: C05 (CLI-045), C10 (CLI-046–052)
Ding Payments requires peer-to-peer NFC transport for payment-request payloads on iOS and Android. Expo Go does not expose native NFC APIs; a development build is mandatory.
Use react-native-nfc-manager (v3.17+) with the official Expo config plugin.
- Mature NDEF read/write APIs on Android and Core NFC on iOS
- Official Expo config plugin for permissions and entitlements
- Active maintenance and broad community usage
- Fits the abstraction layer (
NfcService) without leaking native details to product code
| Option | Rejected because |
|---|---|
react-native-hce or similar |
Weaker NDEF support across both platforms |
| Custom native modules | Higher maintenance; slower validation |
| Expo Go only | No NFC access |
| QR-only | Out of scope for C10; planned as fallback |
react-native-nfc-manager@^3.17.2
| Platform | Capability | Notes |
|---|---|---|
| Android | NDEF push + tag reader mode | Primary P2P path via setNdefPushMessage |
| iOS | Core NFC reader / NDEF write to tags | P2P limited; validate on physical hardware |
| Web | Not supported | Stub returns isSupported: false |
| Expo Go | Not supported | Requires dev build rebuild after native changes |
- Max NDEF payload: 880 bytes (conservative; typical Type 2 tag usable ~888 bytes minus overhead)
- Encoding: UTF-8 compact JSON (
application/jsonMIME NDEF record) - Schema:
payment_request.v1— seesrc/features/nfc/schemas/paymentRequest.ts
NFCReaderUsageDescriptionin Info.plist (via config plugin)- NDEF entitlement:
com.apple.developer.nfc.readersession.formats(viaincludeNdefEntitlement: true)
android.permission.NFCin AndroidManifest (via config plugin)- Minimum SDK enforced by plugin (API 31+)
| Session | Timeout | Policy |
|---|---|---|
| Writer (receiver) | 60s | Auto-cancel + resource cleanup |
| Reader (payer) | 45s | Single-read per session; ignore duplicates |
- Android physical device: NFC initialization and NDEF write/read roundtrip works
- iOS physical device: NFC read/write under Core NFC constraints
- Payload size validation: JSON payload remains below 880 bytes
- PoC page:
/c05in dev-client for spike flows; C10 services insrc/features/nfc/
Any change to app.config.ts NFC plugin settings requires:
npx expo prebuild --clean
npx expo run:ios # or run:androidIf react-native-nfc-manager is incompatible with the Expo dev-client:
- Re-evaluate with explicit native module linking via
expo prebuild - Isolate NFC behind
NfcServiceadapter to swap library without UI changes
- react-native-nfc-manager Expo wiki
- Product spec:
docs/ding-payments.md— Proposed Payment Payload Structure