Search packages, repositories and app categories

Package detailsv1.0.6

flutter_paystack_max

A Flutter package for making payments via Paystack Payment Gateway (https://paystack.com).

AndroidiOSmacOS
30-day downloads
216
Likes
26
Pub points
160

Install package

flutter pub add flutter_paystack_max

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that enables seamless integration with the Paystack Payment Gateway for Android, iOS, and macOS. It provides a straightforward API to handle payment processing, including card payments, bank transfers, and mobile money. The package supports both test and live environments, making it easy to develop and deploy secure payment solutions. Designed for developers seeking reliable, well-documented tools to accept payments in African markets and beyond.

Use cases

  • Integrating Paystack payments into Flutter apps
  • Processing card and bank payments
  • Enabling mobile money transactions
  • Supporting test and live payment modes
  • Building e-commerce applications

Key features

  • Native Paystack SDK integration
  • Support for multiple payment methods
  • Environment configuration (test/live)
  • Easy-to-use payment dialog
  • Cross-platform compatibility (Android, iOS, macOS)

Suitable for

  • Flutter developers building e-commerce apps
  • Startups accepting payments in Africa
  • Apps requiring secure payment processing
  • Developers using Paystack as their gateway
  • Projects needing multi-platform payment support

Considerations

  • Requires valid Paystack account and API keys
  • Needs proper handling of payment success/failure callbacks
  • May require additional backend validation
  • Not suitable for non-Paystack payment providers
  • iOS setup may need additional configuration steps

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

A Flutter package for making payments via Paystack Payment Gateway (https://paystack.com)

pub.dev likes popularity pub points

Pay with card Pay with mobile money

Features

:heavy_check_mark: All Paystack supported payment methods/channels

  • Mobile Money
  • Card
  • USSD
  • Bank Transfer
  • Bank
  • QR
  • EFT

:heavy_check_mark: Verifying Transactions

Supported Platforms

  • Android and
  • iOS

Prerequisites

  • Paystack secret key
  • Callback URL

No configuration required for this package works out of the box.

Usage

  1. Create a transaction request object.
final request = PaystackTransactionRequest(
    reference: '...',
    secretKey: '....',
    email: '...',
    amount: 15 * 100,
    currency: PaystackCurrency.ngn,
    channel: [
        PaystackPaymentChannel.mobileMoney,
        PaystackPaymentChannel.card,
        PaystackPaymentChannel.ussd,
        PaystackPaymentChannel.bankTransfer,
        PaystackPaymentChannel.bank,
        PaystackPaymentChannel.qr,
        PaystackPaymentChannel.eft,
    ],
);
  1. Initialize the transaction with the above transaction request.
final initializedTransaction = await PaymentService.initializeTransaction(request);

if (!initializedTransaction.status) {
    ScaffoldMessenger.of(context).showSnackBar(SnackBar(
        backgroundColor: Colors.red,
        content: Text(initializedTransaction.message),
    ));

    return;
}
  1. Open the payment modal to accept payment
final response = await PaymentService.showPaymentModal(
    context,
    transaction: initializedTransaction,
    // Callback URL must match the one specified on your paystack dashboard,
    callbackUrl: '...'
).then((_) async {
    return await PaymentService.verifyTransaction(
        paystackSecretKey: '...',
        initializedTransaction.data?.reference ?? request.reference,
    );
});

print(response); // Result of the confirmed payment

Additional information

Visit the paystack documentation for more information https://paystack.com/docs/api/transaction

:pencil: Contributing, :disappointed: Issues and :bug: Bug Reports

This project is open to contributions.
Please feel very free to help improve the payment experience on Flutter.
Experienced an issue or want to report a bug? Please, report it here.

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package