---
title: "Organization Subscription"
url: "https://rolebase.io/en/api/org_subscription"
---

[Rolebase](/) ⟩ [API Reference](/en/api)

 API Reference

# `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 paid
*   `canceled` — Subscription has been canceled
*   `incomplete` — Initial payment attempt failed
*   `incomplete_expired` — Initial payment attempt failed and expired
*   `past_due` — Payment is past due
*   `paused` — Subscription is temporarily paused
*   `trialing` — In trial period
*   `unpaid` — 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.
