JSPM

  • Created
  • Published
  • Downloads 5347
  • Score
    100M100P100Q126477F
  • License MIT

Primer SDK for RN

Package Exports

  • @primer-io/react-native
  • @primer-io/react-native/lib/commonjs/index.js
  • @primer-io/react-native/lib/module/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@primer-io/react-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.