org_subscription
Tracks the subscription plan, payment status, and Stripe integration details for an organization.
Fields
| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the subscription |
orgId | uuid | Reference to the organization |
type | Subscription_Plan_Type_Enum | Type of subscription plan (Startup or Business) |
status | Subscription_Payment_Status_Enum | Current payment status of the subscription |
stripeCustomerId | String | Stripe customer ID for billing |
stripeSubscriptionId | String | Stripe subscription ID for recurring payments (optional) |
Subscription Plan Types
- Startup — Basic plan for startups and small teams
- Business — Advanced plan for larger organizations
Payment Statuses
active— Subscription is active and paidcanceled— Subscription has been canceledincomplete— Initial payment attempt failedincomplete_expired— Initial payment attempt failed and expiredpast_due— Payment is past duepaused— Subscription is temporarily pausedtrialing— In trial periodunpaid— Payment failed and subscription is unpaid
Relationships
Object Relationships:
org— The organization this subscription belongs to
Query Examples
Get Organization Subscription
query GetOrgSubscription($orgId: uuid!) {
org_subscription(where: { orgId: { _eq: $orgId } }) {
id
type
status
org {
name
}
stripeCustomerId
stripeSubscriptionId
}
}
Permissions
- All organization members can view subscription details
- Subscription management is handled through the Rolebase platform
- Direct modifications are restricted to system processes
Read-only
Each organization can have only one subscription. The orgId,
stripeCustomerId, and stripeSubscriptionId fields are unique. Subscription
status is automatically updated via Stripe webhooks.