PayInitializer class

Constructors

PayInitializer({required double amount, required String email, required String txRef, required dynamic onComplete(HttpResult), String currency = 'NGN', String country = 'NG', String narration = '', String firstname = '', String lastname = '', Map<String, String>? metadata, List<SubAccount>? subAccounts, String? token, bool preauthorize = false, String? paymentPlan, String paymentType = PaymentType.card, PaymentButtonBuilder? buttonBuilder, String redirectUrl = 'https://payment-status-page.firebaseapp.com/', String? payButtonText, String? phoneNumber})
PayInitializer.fromJson(Map<String, dynamic> json)
factory

Properties

amount double
The amount to be charged in the supplied currency. Must be a valid non=null and positive double. Otherwise, the customer will be asked to input an amount (this is especially useful for donations).
getter/setter pair
buttonBuilder PaymentButtonBuilder?
Build your own custom pay button
getter/setter pair
country String
ISO 3166-1 alpha-2 country code (e.g US, NG). Defaults to NG
getter/setter pair
currency String
An ISO 4217 currency code (e.g USD, NGN). I cannot be empty or null. Defaults to NGN
getter/setter pair
email String
Your customer email. Must be provided otherwise your customer will be promted to input it
getter/setter pair
firstname String
Your customer's first name.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lastname String
Your customer's last name.
getter/setter pair
metadata Map<String, String>?
Your custom data in key-value pairs
getter/setter pair
narration String
Custom description added by the merchant.
getter/setter pair
onComplete ↔ dynamic Function(HttpResult)
A callback function called if the transaction is completed
getter/setter pair
payButtonText String?
The text that is displayed on the pay button. Defaults to "Pay amount"
getter/setter pair
paymentPlan String?
This is the id of a previously created payment plan needed to add a card user to the payment plan.
getter/setter pair
paymentType String
The type of transaction used to sort payments in firestore
getter/setter pair
phoneNumber String?
This is the phone number linked to the customer's mobile money account
getter/setter pair
preauthorize bool
This should be set to true for preauthoize card transactions
getter/setter pair
redirectUrl String
URL to redirect to when a transaction is completed. This is useful for 3DSecure payments so we can redirect your customer back to a custom page you want to show them. defaults to 'https://payment-status-page.firebaseapp.com/'
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subAccounts List<SubAccount>?
As list of sub-accounts. Sub accounts are your vendor's accounts that you want to settle per transaction. See https://developer.flutterwave.com/docs/split-payment
getter/setter pair
token String?
The default saved card token. You don't need to supply this here
getter/setter pair
txRef String
Transaction reference. It cannot be null or empty
getter/setter pair

Methods

copyWith({String? token}) PayInitializer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited