
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-moolre
Advanced tools
A modern React Native plugin for integrating Moolre Payments. Accept mobile payments effortlessly in Ghana with a customizable checkout button.
react-native-moolre is a modern React Native plugin that enables seamless integration with the Moolre Payments platform. Accept mobile payments effortlessly in Ghana using a professional, customizable checkout button.
yarn add react-native-moolre
This plugin requires react-native-webview as a peer dependency. If it’s not already in your project, install it:
yarn add react-native-webview
🎯 If you're using Expo Go, no extra installation is required —
react-native-webviewis already included.
import { MoolrePayButton } from 'react-native-moolre';
<MoolrePayButton
amount={50}
publicKey="your_public_key"
accountNumber="your_account_number"
email="user@example.com"
onSuccess={(reference) => {
console.log("Payment successful. Ref:", reference);
}}
onError={({ code, message }) => {
console.error(`Payment error [${code}]: ${message}`);
}}
buttonStyle={{ padding: 12, borderRadius: 8 }}
textStyle={{ fontSize: 16 }}
/>
💡 The
callbackUrlprop is optional. By default, a deeplink is used to return users to your app. If you'd like to handle redirects via your backend or browser, provide a customcallbackUrl:callbackUrl="https://yourdomain.com/payment/callback"
import React from 'react';
import {
View,
Text,
FlatList,
SafeAreaView,
StyleSheet,
Alert,
} from 'react-native';
import { MoolrePayButton } from 'react-native-moolre';
const products = [
{ id: '1', name: 'Premium Sneakers', price: 120 },
{ id: '2', name: 'T-Shirt', price: 40 },
{ id: '3', name: 'Cap', price: 25 },
];
export default function App() {
const total = products.reduce((sum, item) => sum + item.price, 0);
return (
<SafeAreaView style={styles.container}>
<Text style={styles.heading}>Checkout</Text>
<FlatList
data={products}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View style={styles.product}>
<Text style={styles.name}>{item.name}</Text>
<Text style={styles.price}>GHS {item.price.toFixed(2)}</Text>
</View>
)}
contentContainerStyle={{ paddingBottom: 20 }}
/>
<Text style={styles.total}>Total: GHS {total.toFixed(2)}</Text>
<MoolrePayButton
amount={total}
publicKey="your_public_key"
accountNumber="your_account_number"
email="user@example.com"
onSuccess={(ref) => Alert.alert('Success', `Payment ref: ${ref}`)}
onError={({ code, message }) =>
Alert.alert(`Error [${code}]`, message)
}
buttonStyle={styles.button}
textStyle={styles.buttonText}
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: { flex: 1, padding: 20, justifyContent: 'center' },
heading: { fontSize: 28, fontWeight: 'bold', marginBottom: 20 },
product: {
flexDirection: 'row',
justifyContent: 'space-between',
marginBottom: 10,
},
name: { fontSize: 18 },
price: { fontSize: 18, fontWeight: '600' },
total: {
fontSize: 20,
fontWeight: 'bold',
marginTop: 20,
marginBottom: 10,
},
button: {
backgroundColor: '#fff',
padding: 15,
borderRadius: 10,
borderColor: '#FF9900',
borderWidth: 1.5,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
},
buttonText: {
color: '#111',
fontWeight: 'bold',
fontSize: 16,
},
});
| Prop | Type | Required | Description |
|---|---|---|---|
amount | number | ✅ | Payment amount in Ghana cedis |
publicKey | string | ✅ | Your Moolre public API key |
accountNumber | string | ✅ | Your Moolre merchant account number |
currency | string | ❌ | Defaults to "GHS" |
email | string | ❌ | Customer email address |
callbackUrl | string | ❌ | Optional custom payment redirect callback URL |
onSuccess | (ref: string) => void | ✅ | Triggered on successful payment |
onError | ({ code, message }) => void | ✅ | Triggered on failure or cancellation |
buttonStyle | ViewStyle | ❌ | Custom styles for the button |
textStyle | TextStyle | ❌ | Custom styles for the button text |
We welcome all PRs, suggestions, and improvements! Please follow the guidelines in CONTRIBUTING.md when contributing.
MIT © Moolre HQ
Made with ❤️ by the Moolre team.
FAQs
A modern React Native plugin for integrating Moolre Payments. Accept mobile payments effortlessly in Ghana with a customizable checkout button.
We found that react-native-moolre demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.