BankTransferRequest class

Payment request for bank transfer payments.

This class represents a bank transfer payment request where Paystack generates temporary account details for customers to transfer money directly from their bank accounts.

Properties

The bank transfer request uses standard PaymentRequest properties. Paystack will generate account details (account number, bank name, account name) that should be displayed to the customer for the transfer.

Example

final request = BankTransferRequest(
  amount: 100000, // ₦1,000.00
  currency: Currency.ngn,
  email: 'customer@example.com',
  reference: 'bank_transfer_123',
);

final response = await AllPaystackPayments.initializePayment(request);
// Display bank details from response.rawResponse['data']
Inheritance

Constructors

BankTransferRequest.new({required int amount, required Currency currency, required String email, String? reference, Map<String, dynamic>? metadata, String? callbackUrl, String? accountNumber, String? bankCode, String? bankName, BankTransferType transferType = BankTransferType.account})

Properties

accountNumber String?
Bank account number (optional, will be generated by Paystack)
final
amount int
Amount to be charged in kobo (smallest currency unit)
finalinherited
bankCode String?
Bank code (optional, will be generated by Paystack)
final
bankName String?
Bank name (optional, will be generated by Paystack)
final
callbackUrl String?
Callback URL for web payments
finalinherited
currency Currency
Currency for the transaction
finalinherited
email String
Email address of the customer
finalinherited
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>?
Additional metadata for the transaction
finalinherited
paymentMethod PaymentMethod
Payment method type
finalinherited
reference String?
Unique reference for the transaction (optional, will be generated if not provided)
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transferType BankTransferType
Transfer type
final

Methods

getSpecificJson() Map<String, dynamic>
Method to be implemented by subclasses for payment-method-specific data.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert request to JSON for API call.
inherited
toString() String
A string representation of this object.
inherited
validate() → void
Validate the request data.
override

Operators

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