Payments class
Foundrex Payments module — unified checkout with Stripe.
Requires an active auth session. The access token is injected automatically.
Properties
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< items, required String currency, String? dueDate}) → Future<String, dynamic> >Map< String, dynamic> > - Create an invoice.
-
link(
{required String name, required int amount, required String currency, String? referenceId}) → Future< Map< String, dynamic> > - 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< splits}) → Future<String, dynamic> >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