React Native
🪢 Flick Payment SDK for React Native
A powerful and secure payment SDK for React Native applications that enables seamless integration of payment processing capabilities.
Install
npm install getflick-react-native
yarn add getflick-react-native
Configuration and usage
Basic Implementation
Using FlickPound Component
import { FlickProvider, FlickPound } from 'getflick-react-native';
function PoundPaymentScreen() {
const handleError = (error) => {
console.error('Payment Error:', error);
// Handle error appropriately
};
const handleSuccess = (data) => {
console.log('Payment Success:', data);
// Handle successful payment
};
return (
<FlickProvider
environment="production"
apiKey="YOUR_API_KEY"
onError={handleError}
onSuccess={handleSuccess}
>
<FlickPound
config={{
amount: 500, // Amount in pence
cust_email: '[email protected]',
currency: 'GBP',
redirectUrl: 'payer://confirm-send',
}}
/>
</FlickProvider>
);
}
Parameter | Type | Required | Description |
---|---|---|---|
environment | 'production' | 'sandbox' | Yes | The environment to use for payments |
apiKey | string | Yes | Your Flick API key |
onError | Function | Yes | Callback for payment errors |
onSuccess | Function | Callback for successful payments | |
onSuccess | function | This is called when your user has successfully completed enrollment with their preferred institution. The sample response data below is passed to the widget |
FlickPound Props
Prop | Type | Required | Description |
---|---|---|---|
amount | number | Yes | Payment amount in pence |
cust_email | string | Yes | Customer email address |
redirectUrl | string | No | Redirect url after authorization |
Minimum AmountsGBP: Minimum 5.00 GBP (500 pence)
License
This project is licensed under the MIT License
Updated 7 days ago