BillingDatasource class
Stripe-backed billing operations for orgs and solo web users.
Mobile app purchases go through RevenueCat instead (see
RevenueCatDatasource). This datasource is the only entry point for Stripe
Checkout and the Stripe Billing Portal — the Edge Functions it calls are
the single place Stripe secret keys ever touch.
Constructors
- BillingDatasource(SupabaseClient _client)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createCheckoutSession(
{required String plan, required String interval, String? orgId, int? seats}) → Future< String> - Request a Stripe Checkout URL for the given plan.
-
createPortalSession(
{String? orgId}) → Future< String> - Request a Stripe Billing Portal URL for managing the subscription.
-
getMySubscription(
) → Future< SubscriptionModel?> - Fetch the active subscription for the current user (solo Professional).
-
getOrgSubscription(
String orgId) → Future< SubscriptionModel?> - Fetch the active subscription for an organization (Stripe-sourced).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited