Skip to main content

React Native SDK

Build payments in your native Android and iOS apps using React Native. Collect your customers' payment account details using the pre-built Payment Sheet UI, or build your own Custom UI and access QuickStream gateway components directly.

Getting started

Step 1: API credentials

Make sure that you have received your Publishable and Secret REST API keys for our QuickStream REST API.

Step 2: Server-side

  1. Create an endpoint for your back-end to receive a singleUseTokenId from the SDK. This is generated by the SDK from the Single-use Token API using your Publishable API key.
  2. Set up your back-end implementation to take a payment using a singleUseTokenId via the Transactions API.

Step 3: Client-side

Refer to the React Native SDK Reference.

Install the SDK

To install the React Native SDK, run one of the following commands in your project’s directory:

npm install @westpac-developer/sdk
yarn add @westpac-developer/sdk

Install dependencies

Install the required peer dependencies:

npm install @rnw-community/react-native-payments @react-navigation/native @react-navigation/stack \
        @gorhom/bottom-sheet react-native-reanimated react-native-gesture-handler \
        @google/react-native-make-payment react-native-svg react-native-network-info \
        react-native-device-info react-native-localize react-native-payment-icons \
        @react-native-clipboard/clipboard lucide-react-native
yarn add @rnw-community/react-native-payments @react-navigation/native @react-navigation/stack \
        @gorhom/bottom-sheet react-native-reanimated react-native-gesture-handler \
        @google/react-native-make-payment react-native-svg react-native-network-info \
        react-native-device-info react-native-localize react-native-payment-icons \
        @react-native-clipboard/clipboard lucide-react-native

Link native modules for iOS. There are no modules to link for Android.

cd ios && pod install

Add TypeScript Support

Follow the official guide for Adding TypeScript to an Existing Project.

Integrations

Choose from the Payment Sheet or Custom UI integrations, and refer to the SDK Reference for more.

Payment Sheet UI

Collect your customers' payment account details using the pre-built Payment Sheet UI.

Custom UI

Build your own Custom UI and access QuickStream gateway components directly.

React Native SDK Reference

View the React Native SDK reference documentation, covering functions and components available in all integration types.

Westpac Privacy Statement

Privacy Statement (for individuals whose personal information may be collected - in this clause referred to as "you"). All personal information we collect about you is collected, used and disclosed by us in accordance with our Privacy Statement which is available at Privacy Statement or by calling us through your relationship manager or Westpac representative. Our Privacy Statement also provides information about how you can access and correct your personal information and make a complaint. You do not have to provide us with any personal information but, if you don't, we may not be able to process an application or a request for a product or service.