sanwo_flutter library

Sanwo payment SDK for Flutter.

A universal payment SDK that provides a single interface for multiple payment providers (Paystack, Flutterwave, and more).

Quick start

import 'package:sanwo_flutter/sanwo_flutter.dart';
import 'package:sanwo_paystack/sanwo_paystack.dart';

final sanwo = Sanwo(
  provider: paystackProvider,
  publicKey: 'pk_test_...',
);

final result = await sanwo(
  context: context,
  options: CheckoutOptions(
    amount: 500000,
    currency: 'NGN',
    customer: CheckoutCustomer(email: 'user@example.com'),
  ),
);

if (result.status == CheckoutStatus.successful) {
  print('Paid! Ref: ${result.reference}');
}

Classes

CheckoutCustomer
Customer information for checkout.
CheckoutOptions
Configuration options for a checkout session.
CheckoutResult
The result of a checkout session.
Sanwo
The main Sanwo payment SDK entry point.
SanwoEngine
The Sanwo template engine.
SanwoEventData
Data associated with a Sanwo payment event.
SanwoProviderDefinition
Definition of a payment provider.

Enums

CheckoutStatus
The outcome status of a checkout session.
SanwoEvent
Sanwo payment event types.

Typedefs

SanwoEventCallback = void Function(SanwoEventData data)
Callback type for Sanwo events.