
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
flutterwave-next
Advanced tools
A small client-side-safe React/Next.js library to integrate Flutterwave Checkout into your Next.js or React app.
npm install flutterwave-next
✅ Safe for Next.js App Router
⚙️ Use with a Button or programmatically via hooks
📦 No dependencies (uses native React + Flutterwave's CDN script)
🎛 Customizable: pass any valid Flutterwave config
'use client';
import { FlutterwaveButton } from 'flutterwave-next/client';
export default function Page() {
return (
<FlutterwaveButton
public_key="FLWPUBK_TEST-xxxxxxxxxxxxxxxx"
tx_ref={`tx-${Date.now()}`}
amount={2500}
payment_options=['mpesa','card']
customer={{
email: 'test@mail.com',
phone_number: '08100000000',
name: 'John Doe',
}}
customizations={{
title: 'My Store',
description: 'Payment for items in cart',
logo: 'https://example.com/logo.png',
}}
callback={(data) => {
console.log('Payment Success:', data);
alert(`Payment complete! Ref: ${data.transaction_id}`);
}}
onclose={() => {
console.log('Payment closed');
alert('Payment was cancelled.');
}}
/>
);
}
Use this when you want to control when and how to trigger payments.
'use client';
import { useFlutterwaveCheckout } from 'flutterwave-next/client';
export default function CustomPaymentButton() {
const { initiatePayment, ready } = useFlutterwaveCheckout({
public_key: 'FLWPUBK_TEST-xxxxxxxxxxxxxxxx',
tx_ref: `tx-${Date.now()}`,
amount: 5000,
currency: 'NGN',
payment_options: ['card', 'banktransfer'],
customer: {
email: 'user@example.com',
phone_number: '08000000000',
name: 'User Name',
},
customizations: {
title: 'My Store',
description: 'Secure Payment',
logo: 'https://example.com/logo.png',
},
callback: (data) => console.log('Payment complete!', data),
onclose: () => console.log('Checkout closed'),
});
return (
<button onClick={initiatePayment} disabled={!ready}>
{ready ? 'Pay Now' : 'Loading...'}
</button>
);
}
Tracks and stores payment status (success / closed):
'use client';
import {
useFlutterwaveCheckout,
useCheckoutStatus,
} from 'flutterwave-next/client';
export default function PayWithStatus() {
const { status, onSuccess, onClose } = useCheckoutStatus();
const { initiatePayment, ready } = useFlutterwaveCheckout({
public_key: 'FLWPUBK_TEST-xxxxxxxxxxxxxxxx',
tx_ref: `tx-${Date.now()}`,
amount: 3000,
currency: 'NGN',
payment_options: ['card', 'banktransfer'],
customer: {
email: 'customer@example.com',
phone_number: '08000000000',
name: 'Customer',
},
customizations: {
title: 'My Store',
description: 'Order Payment',
logo: 'https://example.com/logo.png',
},
callback: onSuccess,
onclose: onClose,
});
return (
<>
<button onClick={initiatePayment} disabled={!ready}>
{ready ? 'Pay Now' : 'Loading...'}
</button>
{status?.status === 'success' && (
<p>✅ Paid: {status.data.transaction_id}</p>
)}
{status?.status === 'closed' && <p>❌ Payment cancelled</p>}
</>
);
}
Store your public key in your .env file:
NEXT_PUBLIC_FLUTTERWAVE_KEY=FLWPUBK_TEST-xxxxxxxxxxxxxxxx
Then use it in your component:
public_key={process.env.NEXT_PUBLIC_FLUTTERWAVE_KEY}
This library only supports client-side rendering ('use client' is required).
Works great with Next.js App Router or Create React App.
You are responsible for verifying transactions on your backend via webhook or Flutterwave’s status API.
This is for frontend only — no sensitive keys should be exposed.
MIT © 2025 — Daggie Blanqx @daggieblanqx
FAQs
Flutterwave checkout wrapper for React/Next.js apps
The npm package flutterwave-next receives a total of 7 weekly downloads. As such, flutterwave-next popularity was classified as not popular.
We found that flutterwave-next 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.