

Table Of Content
- Getting Started
- Usage
- Props
- Types
- Contributing
What’s Inside?
- Pay with Flutterwave button and checkout dialog.
- Standard payment initialization function.
- Flutterwave designed button.
:warning: If Using Version 2 API :warning:
This version of the library’s docs focuses on use cases with the Version 3 of Flutterwaves API, if you are still using the Version 2 API please use this documentation instead.Installation
This library is available on npm, you can install it by runningnpm install --save flutterwave-react-native or yarn add flutterwave-react-native
Dependencies
In order to render the Flutterwave checkout screen this library depends on react-native-webview ensure you properly install this library before continuing.Activity Indicator (only needed for android)
To display the Flutterwave styled activity indicator when the checkout screen is being loaded on Android you will need to add some modules inandroid/app/build.gradle.
Skip this if you already have setup your app to support gif images.
:fire: MERCHANT PUBLIC KEY :fire:
In order to use this library you are required to use your merchant public key and not the secret key. See how to get your API Keys here:fire: IMPORTANT INFORMATION :fire:
If theoptions property on PayWithFlutterwave changes, when next the user taps on the button a new payment will be initialized whether the last one was successful or not.
Remember you cannot use the same transaction reference for two different payments, also remember to recreate the transaction reference before allowing the user initiate a new payment.
Usage
Below are a few examples showcasing how you can use the library to implement payment in your React Native app.PayWithFlutterwave
View All Props
Import PayWithFlutterwave from flutterwave-react-native and use it like so.
PayWithFlutterwave (with custom render)
View All Props
Import PayWithFlutterwave from flutterwave-react-native and use it like so.
FlutterwaveButton (Flutterwave styled button)
View All Props
Import FlutterwaveButton from flutterwave-react-native and use it like so.
FlutterwaveInit
When called, this function returns a Promise which resolves to a string on success and rejects if an error occurs. See all config options ImportFlutterwaveInit from flutterwave-react-native and use it like so.
Aborting Payment Initialization
:wave: Hi, so there are cases where you have already initialized a payment withFlutterwaveInit but might also want to be able to cancel the payment initialization should in case your component is being unmounted or you want to allow users cancel the action before the payment is initialized, we have provided a way for you to do this… continue reading