InitializeTransactionOptions class
Options for initializing a new payment transaction.
This class contains all the parameters needed to create a new transaction on Paystack. The customer will be redirected to complete payment after successful initialization.
Example usage:
final options = InitializeTransactionOptions(
email: 'customer@example.com',
amount: '50000', // ₦500.00 in kobo
currency: 'NGN',
reference: 'tx_123456',
callbackUrl: 'https://example.com/callback',
);
- Mixed-in types
- Annotations
-
- @MappableClass.new()
Constructors
-
InitializeTransactionOptions({required String email, required String amount, String? currency, String? reference, String? callbackUrl, String? plan, int? invoiceLimit, Map<
String, dynamic> ? metadata, List<String> ? channels, String? splitCode, String? subaccount, int? transactionCharge, String? bearer}) -
Creates a new InitializeTransactionOptions instance.
const
Properties
- amount → String
-
Transaction amount in the smallest currency unit (as string).
final
- bearer → String?
-
Who bears the Paystack transaction charges.
final
- callbackUrl → String?
-
URL to redirect customer after payment completion.
final
-
channels
→ List<
String> ? -
List of payment channels to enable for this transaction.
final
-
copyWith
→ InitializeTransactionOptionsCopyWith<
InitializeTransactionOptions, InitializeTransactionOptions, InitializeTransactionOptions> -
no setterinherited
- currency → String?
-
Currency code for the transaction.
final
- email → String
-
Customer's email address for the transaction.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- invoiceLimit → int?
-
Number of times to charge customer during subscription.
final
-
metadata
→ Map<
String, dynamic> ? -
Additional data to store with the transaction.
final
- plan → String?
-
Subscription plan code if this is a subscription transaction.
final
- reference → String?
-
Unique reference for this transaction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- splitCode → String?
-
Split payment code for distributing transaction amount.
final
- subaccount → String?
-
Subaccount code to credit with part of the transaction.
final
- transactionCharge → int?
-
Additional charge to add to the transaction (in smallest unit).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
inherited
-
toMap(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited