BushaPaySuccess class
Payment completed successfully.
Full payment data (amounts, rates, timeline) is available when payment was completed in the web checkout flow. When completed via the Busha app, only paymentId and status are available.
Use hasFullData to check which fields are populated.
Important: Always verify the payment server-side via webhooks. The client result is a UX hint, not the source of truth.
- Inheritance
-
- Object
- BushaPayResult
- BushaPaySuccess
Constructors
-
BushaPaySuccess({required String paymentId, required String status, String? sourceAmount, String? sourceCurrency, String? targetAmount, String? targetCurrency, String? requestedAmount, String? currency, Map<
String, dynamic> ? rate, Map<String, dynamic> ? merchantInfo, Map<String, dynamic> ? timeline, Map<String, dynamic> ? rawData}) -
const
- BushaPaySuccess.fromCallback({required String paymentId})
-
Creates a success result from a callback deep link (Path B — limited data).
factory
-
BushaPaySuccess.fromCommerceJs(Map<
String, dynamic> payload) -
Creates a success result from commerce-js onSuccess data (Path A — full data).
factory
Properties
- currency → String?
-
Currency of the requested amount.
final
- hasFullData → bool
-
Whether full payment data is available.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
merchantInfo
→ Map<
String, dynamic> ? -
Merchant information.
final
- paymentId → String
-
Payment request ID (e.g., 'PAYR_EhDmpnPwDSjO'). Always present.
final
-
rate
→ Map<
String, dynamic> ? -
Exchange rate details.
final
-
rawData
→ Map<
String, dynamic> ? -
Full unmodified response from commerce-js.
final
- requestedAmount → String?
-
Originally requested amount.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceAmount → String?
-
Amount paid in source currency (e.g., '0.00017798').
final
- sourceCurrency → String?
-
Source currency the user paid with (e.g., 'BTC').
final
- status → String
-
Payment status (e.g., 'completed'). Always present.
final
- targetAmount → String?
-
Amount received in target currency (e.g., '13.42').
final
- targetCurrency → String?
-
Target settlement currency (e.g., 'USDT').
final
-
timeline
→ Map<
String, dynamic> ? -
Payment timeline with step-by-step events.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited