Skip to main content
Version: 0.15.0

Installation & Configuration

Easily accept payments through Apple Pay, Samsung Pay, Stc Pay or Credit Card (with managed 3DS step) in your React Native app with Moyasar in iOS and Android.

Prerequisites​

NodeJS Compatible Versions​

Make sure you have one of the following Node.js versions installed:

  • v20.19 or higher
  • v22.12 or higher
  • v23.4 or higher

Accepting Apple Pay Payments in iOS​

Complete the following steps to easily accept Apple Pay payments:

  • Follow this guide to setup your Apple developer account and integrate it with Moyasar.
  • Follow this guide to enable accepting Apple Pay in your application using Xcode.

Accepting Samsung Pay Payments​

  • Follow this guide to setup your Samsung developer account and integrate it with Moyasar.
  • Set your app’s applicationId to match with your registered service in the Samsung Pay Merchant dashboard.

Accepting Stc Pay Payments​

Follow this guide to setup Stc Pay integration.

Installation Commands​

npm install react-native-moyasar-sdk react-native-webview react-native-svg

'react-native-webview' and 'react-native-svg' packages are required peer dependencies for Moyasar's SDK functionality.

iOS Setup​

Link native dependencies for iOS by running the following command in the ios/ directory:

pod install

Samsung Pay Configuration​

Enable dataBinding in your app's build.gradle like the following:

android {
// ... The rest of your code

buildFeatures {
dataBinding true
// ...
}

// ...
}
info
  • Most likely you will find the right build.gradle file in (android/app/build.gradle).

Troubleshooting​

If you are using Jest and encountering issues, update your Jest configuration (likely found in your package.json or any jest.config.* file) with the following:

module.exports = {
// ... The rest of your configuration
transformIgnorePatterns: ['node_modules/(?!((@)?react-native|react-native-moyasar-sdk)/)'],
};
info
  • If you previously had the transformIgnorePatterns field make sure to not override it with the above, instead add the react-native-moyasar-sdk part to it.

Migration guide​

Visit changelog page for migration guide from previous versions.