@rnw-community/react-native-payments
Version:
Accept Payments with Apple Pay and Android Pay using the Payment Request API.
65 lines (42 loc) • 4.11 kB
Plain Text
# @rnw-community/react-native-payments
> W3C Payment Request API implementation for React Native — Apple Pay (iOS) and Google Pay (Android), with an Expo config plugin.
TurboModule-based library (React Native New Architecture). An agent given only this package root can locate the full
API surface, the payment change-event contract, platform deviations from the W3C spec, and the native JS<->native
handshake without a repo-wide search.
## Landing
- [readme.md](readme.md): Value proposition, install one-liner, 60-second quickstart, and the doc map below.
## Getting started
- [docs/getting-started/install.md](docs/getting-started/install.md): Install command and platform-setup links.
- [docs/getting-started/quickstart-ios.md](docs/getting-started/quickstart-ios.md): Fastest path to an Apple Pay sheet.
- [docs/getting-started/quickstart-android.md](docs/getting-started/quickstart-android.md): Fastest path to a Google Pay sheet.
- [docs/getting-started/quickstart-expo.md](docs/getting-started/quickstart-expo.md): Expo config plugin + `expo prebuild`.
## Platforms
- [docs/platforms/ios.md](docs/platforms/ios.md): Apple Pay setup, capabilities, and iOS-only known deviations.
- [docs/platforms/android.md](docs/platforms/android.md): Google Pay setup, capabilities, and Android-only known deviations.
- [docs/platforms/web.md](docs/platforms/web.md): Browser fallback behavior via the W3C `PaymentRequest` implementation.
- [docs/platforms/expo.md](docs/platforms/expo.md): Expo config plugin options reference.
## API reference
- [docs/api/index.md](docs/api/index.md): Every exported class, enum, interface and type, one file per entity group.
## Guides
- [docs/guides/change-events.md](docs/guides/change-events.md): `addEventListener`/`removeEventListener`, `updateWith`, sheet errors, `PaymentMethodChangeEvent`.
- [docs/guides/modifiers.md](docs/guides/modifiers.md): Per-method `PaymentDetailsModifier` resolution.
- [docs/guides/errors.md](docs/guides/errors.md): The `ConstructorError` / `DOMException` / `PaymentsError` mapping table.
- [docs/guides/retry.md](docs/guides/retry.md): `PaymentResponse.retry()` semantics and platform limits.
- [docs/guides/testing.md](docs/guides/testing.md): Jest `NativeModules.Payments` mock and example apps.
- [docs/guides/troubleshooting.md](docs/guides/troubleshooting.md): Real reported issues and their fixes.
- [docs/guides/migrate-from-v2.md](docs/guides/migrate-from-v2.md): Breaking changes and upgrade steps from v2 to v3.
- [docs/guides/migrate-from-upstream.md](docs/guides/migrate-from-upstream.md): API mapping from `naoufal/react-native-payments`.
## Architecture & roadmap
- [docs/architecture.md](docs/architecture.md): The JS<->native contract, single-use requests, event lifecycle.
- [docs/roadmap.md](docs/roadmap.md): W3C compliance checklist and open work as issue links.
## Architecture & conventions
- [AGENTS.md](AGENTS.md): Source layout, TurboModule/Expo-plugin architecture, key implementation patterns, dependencies, and coverage.
- [Repository AGENTS.md — PR Review & Merge Policy](../../AGENTS.md#pr-review--merge-policy): Repo-wide policy for triaging automated review findings before merge; applies to this package's PRs.
## Native contract
- [change-event-dispatcher.md](src/class/change-event-dispatcher/change-event-dispatcher.md): `ChangeEventDispatcher` lifecycle — dispatch, per-listener answer, and the single shared timeout race.
- [get-native-payments-event-emitter.md](src/util/get-native-payments-event-emitter/get-native-payments-event-emitter.md): The JS<->native change-event contract — event scoping, generations, and teardown semantics.
## End-to-end verification
- [react-native-payments-example/e2e/readme.md](../react-native-payments-example/e2e/readme.md): Maestro flow inventory and the documented iOS PassKit sheet accessibility-sandbox boundary.
- [maestro-e2e skill](../../.agents/skills/maestro-e2e/SKILL.md): Agent skill for writing and running Maestro E2E flows against this package's example app.
## Optional
- [CHANGELOG.md](CHANGELOG.md): Version history.