BushaPayConfig class

Configuration for a Busha Pay checkout session.

Constructors

BushaPayConfig({required String quoteAmount, required String quoteCurrency, required String targetCurrency, required String sourceCurrency, String? reference, String? metaName, String? metaEmail, String? metaPhone, List<PaymentMethod>? allowedPaymentMethods})
const

Properties

allowedPaymentMethods → List<PaymentMethod>?
Restricts which payment methods the chooser offers.
final
hashCode → int
The hash code for this object.
no setterinherited
metaEmail → String?
Customer email for order context.
final
metaName → String?
Customer or order name shown in the checkout.
final
metaPhone → String?
Customer phone number.
final
quoteAmount → String
Amount to charge (e.g., '10000').
final
quoteCurrency → String
Currency for the quoted amount (e.g., 'NGN', 'USD').
final
reference → String?
Your custom transaction reference. Auto-generated if not provided.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceCurrency → String
Asset the customer pays with (e.g., 'USDT', 'BTC').
final
targetCurrency → String
Currency the payment settles into (e.g., 'NGN', 'USD').
final

Methods

copyWith({String? quoteAmount, String? quoteCurrency, String? targetCurrency, String? sourceCurrency, String? reference, String? metaName, String? metaEmail, String? metaPhone, List<PaymentMethod>? allowedPaymentMethods}) → BushaPayConfig
Creates a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCommerceJson({required String publicKey, required bool devMode, required String callbackUrl}) → Map<String, dynamic>
Converts to the JSON shape expected by commerce-js.
toFormFields({required String publicKey, required String callbackUrl, required String checkoutUrl}) → Map<String, String>
Converts to a map of form fields for direct POST to the checkout page.
toString() → String
A string representation of this object.
inherited

Operators

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