A simple way to integrate/implement Payment Gateway in Flutter app — (Paystack).

TechWithSam — Payment Integration with flutter (Paystack).

Let’s get started

A simple way to integrate or implement Payment Gateway in flutter (Paystack).
TechWithSam — Paystack Keys
paystack_manager: ^1.0.4
onPressed: _processPayment, // this function will be declear later
child: Text(
"Pay N1,000",
void _processPayment() {
try {
PaystackPayManager(context: context)
// Your company Image
image: NetworkImage(
..setAmount(100000) // you need to add two zeros at the end e.g 100000 = N1,000.00
// you can set your own unique transaction reference, here am using timestamp
..setCurrency("NGN") // Set currency, the platform only has three currencies, when registering the
list of countries listed is the currency that is available for you to use
..setEmail("samuelbeebest@gmail.com") // user email address and information
"custom_fields": [
"value": "TechWithSam", // set this your company name
"display_name": "Payment_to",
"variable_name": "Payment_to"
} catch (error) {
print('Payment Error ==> $error');
void _onPaymentSuccessful(Transaction transaction) {
print('Transaction succesful');
"Transaction message ==> ${transaction.message}, Ref ${transaction.refrenceNumber}");
void _onPaymentPending(Transaction transaction) {
print('Transaction Pending');
print("Transaction Ref ${transaction.refrenceNumber}");
void _onPaymentFailed(Transaction transaction) {
print('Transaction Failed');
print("Transaction message ==> ${transaction.message}");
void _onCancel(Transaction transaction) {
print('Transaction Cancelled');
Payment Integration screenshot — Paystack #techwithsam
Screentshot 2 — Techwithsam
A simple way to integrate or implement Payment Gateway in flutter (Paystack).

Hi, I run the YouTube channel called TechWithSam! I’m passionate about learning and teaching programming majorly Flutter for the moment.