subscription7 ops

User Subscription API

End-user subscription plans, tiers, and renewal management.

Queries

QUERY

availableUserSubscriptionPlans

#

Plans the authenticated end user is eligible to subscribe to within the given vertical. Filters by (role, vertical) against each plan's allowed_roles and allowed_verticals. Only Active plans are returned.

Arguments

  • vertical!
Returns[!]!
QUERY

myActiveUserSubscriptions

#

Active subscriptions held by the calling end user. Excludes terminal states (Canceled / Expired); includes Trialing / Active / PastDue / Grace.

Returns[!]!
QUERY

myUserSubscriptionConfig

#

Boot-time configuration for end-user apps. Apps call this once on load and adapt their UI to the result — hiding subscription entries entirely when no plans are enabled, or surfacing "My subscription" when the user has an existing one. app identifies the calling app (e.g. TaxiPassenger) so the resolver can derive Stripe redirect URLs from the tenant's verified domain for that app. Without it, redirect URLs are None and the client must fall back to per-environment defaults.

Arguments

  • app
Returns!

Mutations

MUTATION

cancelMyUserSubscription

#

Cancel the calling end user's subscription. Defaults to at_period_end=true so entitlements stay live until the period closes; pass false to cancel immediately.

Arguments

  • input!
Returns!
MUTATION

createUserSubscriptionPortalSession

#

Open a Stripe Customer Billing Portal so the end user can update their payment method or view invoices.

Arguments

  • input!
Returns!
MUTATION

reactivateMyUserSubscription

#

Reverse a "cancel at period end" scheduling on the calling end user's subscription.

Arguments

  • input!
Returns!
MUTATION

startUserSubscriptionCheckout

#

Open a Stripe Checkout Session so the calling end user can subscribe to one of the tenant's published plans. Direct charges on the tenant's Stripe account; the platform never touches funds.

Arguments

  • input!
Returns!