The official Trustly React Native SDK for integrating Trustly payment solutions into your React Native applications.
Read the Official Documentation
- Node 22.23.0
- React 18.3.1 or higher
- React Native 0.76.9 or higher
Install the package from NPM:
npm install @trustlyinc/trustly-react-nativeOr using yarn:
yarn add @trustlyinc/trustly-react-nativeThe SDK requires the following peer dependencies to be installed in your project:
npm install react react-native react-native-inappbrowser-reborn react-native-webview @react-native-async-storage/async-storage react-native-get-random-values --legacy-peer-depsOr using yarn:
yarn add react react-native react-native-inappbrowser-reborn react-native-webview @react-native-async-storage/async-storage react-native-get-random-valuesTo get up and running with this SDK, check out the example application.
We recommend Visual Studio Code as the code editor. There are some settings for it versioned in this repository. Please also install its recommended extensions.
npm installBuild the TypeScript source code to JavaScript:
npm run buildThe compiled output will be in the dist/ directory.
To test the SDK locally with the example application:
npm run localThis command will:
- Clean the example app's node_modules
- Build the SDK
- Pack it as a tarball
- Install the packed SDK into the example app