Payments class

Foundrex Payments module — unified checkout with Stripe.

Requires an active auth session. The access token is injected automatically.

Constructors

Payments({required FoundrexHttp http, required Auth auth})

Properties

auth Auth
final
hashCode int
The hash code for this object.
no setterinherited
http → FoundrexHttp
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

balance() Future<Map<String, dynamic>>
Get the current account balance.
cancelSubscription(String subscriptionId) Future<Map<String, dynamic>>
Cancel an active subscription.
checkoutAndPay({required int amount, required String referenceId, String? fxUserAccessToken}) Future<bool>
Create a checkout session and present the payment sheet.
history({int page = 1, int perPage = 20}) Future<PaymentHistory>
Get paginated payment history for the current user.
invoice({required List<Map<String, dynamic>> items, required String currency, String? dueDate}) Future<Map<String, dynamic>>
Create an invoice.
Create a payment link.
methods() Future<Map<String, dynamic>>
Get available payment methods for the current user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
payout({required int amount, required String currency, String? description}) Future<Map<String, dynamic>>
Create a payout.
refund(String paymentId, {int? amount, String? reason}) Future<Map<String, dynamic>>
Refund a payment (full or partial).
split({required int amount, required String currency, required String referenceId, required List<Map<String, dynamic>> splits}) Future<Map<String, dynamic>>
Create a split payment.
subscribe({required String priceId, required String referenceId, String? interval, int? trialDays}) Future<Map<String, dynamic>>
Create a subscription for the current user.
subscriptions({int? page, int? limit, String? status}) Future<Map<String, dynamic>>
Get paginated list of subscriptions for the current user.
toString() String
A string representation of this object.
inherited
transfer({required int amount, required String destination, String? currency, String? referenceId}) Future<Map<String, dynamic>>
Transfer funds to another account.

Operators

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