@primer-io/react-native

Primer SDK for RN

Usage no npm install needed!

<script type="module">
  import primerIoReactNative from 'https://cdn.skypack.dev/@primer-io/react-native';
</script>

README

Primer React Native SDK

Official React Native SDK plugin for Primer


The simplest payments integration, ever. Integrate payments once with just a few lines of code, and empower ops teams to automate complex business logic with Primer.

Features of the React Native SDK

  • 💳 Create great payment experiences with our Universal Checkout

  • 🧩 Connect and configure new payment methods with only a few lines of code

  • ✅ Dynamically handle 3DS 2.0 across processors and be SCA ready

  • ♻️ Store payment methods for one-click checkout, recurring and repeat payments

  • 🔒 Always PCI compliant without redirecting customers


💾 Installation

npm i @primer-io/react-native

🔧 Usage

import { Primer } from '@primer-io/react-native';

// fetch Primer client token from backend.
const token: string = await fetchClientToken();

// configure listeners and settings.
const onTokenizeSuccess = async (t, handler) => {
  const payment = await createPayment(t);
  handler.handleSuccess(); // resume the checkout flow with success message.
};

// show Universal Checkout with client token and config.
Primer.showUniversalCheckout(token, { onTokenizeSuccess });

For more info & help troubleshooting, check out our 🔥 docs

📚 License

Distributed under the MIT License. See LICENSE for more information.