> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runaether.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get billing subscription



## OpenAPI

````yaml api-reference/openapi.json GET /billing/subscription
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /billing/subscription:
    get:
      tags:
        - billing
      summary: Get billing subscription
      operationId: getBillingSubscription
      parameters:
        - description: >-
            The client asking: web, ios or android. The actions returned are the
            ones available from that surface.
          explode: false
          in: query
          name: surface
          required: true
          schema:
            description: >-
              The client asking: web, ios or android. The actions returned are
              the ones available from that surface.
            enum:
              - web
              - ios
              - android
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingSubscriptionResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: >-
            The X-Aether-Org-Id header is malformed or nil; the auth middleware
            refuses it before the operation runs. The body carries error and
            code bad_request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Internal Server Error
components:
  schemas:
    BillingSubscriptionResponse:
      additionalProperties: false
      properties:
        actions:
          $ref: '#/components/schemas/BillingActions'
        active_billing_cycle_id:
          type: string
        billing_cycle_ends_at:
          type: string
        billing_cycle_starts_at:
          type: string
        cancel_at_period_end:
          type: boolean
        cancellation_effective_at:
          type: string
        checkout_pending:
          type: boolean
        credits_remaining:
          format: double
          type: number
        current_period_end:
          type: string
        current_period_start:
          type: string
        managed_by:
          enum:
            - none
            - stripe
            - app_store
            - play_store
          type: string
        monthly_credit_grant:
          format: int64
          type: integer
        payment_state:
          enum:
            - not_required
            - checkout_pending
            - active
            - grace_period
            - past_due
            - unpaid
            - canceled
            - blocked
          type: string
        plan:
          $ref: '#/components/schemas/OrgBillingPlan'
        settlement_mode:
          enum:
            - prepaid
            - enterprise_invoice
          type: string
        store_app_user_id:
          description: >-
            On ios and android, the signed-in user's store identity, which the
            store SDK logs in with. Absent until the user's first store purchase
            intent mints it, and on the web.
          format: uuid
          type: string
        subscription_status:
          enum:
            - free
            - active
            - trialing
            - incomplete
            - past_due
            - unpaid
            - canceled
            - paused
          type: string
        tier:
          enum:
            - free
            - starter
            - pro
            - max
            - team
          type: string
      required:
        - plan
        - settlement_mode
        - tier
        - monthly_credit_grant
        - credits_remaining
        - subscription_status
        - payment_state
        - cancel_at_period_end
        - active_billing_cycle_id
        - billing_cycle_starts_at
        - checkout_pending
        - managed_by
        - actions
      type: object
    BillingErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - bad_gateway
            - bad_request
            - checkout_pending
            - conflict
            - enterprise_invoice
            - forbidden
            - free_tier
            - gateway_timeout
            - gone
            - internal_error
            - invalid_surface
            - managed_elsewhere
            - method_not_allowed
            - no_billing_history
            - not_acceptable
            - not_found
            - not_implemented
            - payment_delinquent
            - payment_required
            - personal_org_requires_personal_plan
            - precondition_failed
            - provider_unavailable
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - requires_org_admin
            - service_unavailable
            - subscription_active
            - subscription_pending
            - team_org_requires_team_plan
            - team_plan_web_only
            - team_seats_via_membership
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - warm_slot_occupied
            - web_only
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    BillingActions:
      additionalProperties: false
      properties:
        buy_credit_pack:
          $ref: '#/components/schemas/BillingActionCapability'
        buy_inference_topup:
          $ref: '#/components/schemas/BillingActionCapability'
        change_plan:
          $ref: '#/components/schemas/BillingActionCapability'
        manage_subscription:
          $ref: '#/components/schemas/BillingActionCapability'
        subscribe:
          $ref: '#/components/schemas/BillingActionCapability'
        view_billing_history:
          $ref: '#/components/schemas/BillingActionCapability'
      required:
        - subscribe
        - change_plan
        - manage_subscription
        - view_billing_history
        - buy_credit_pack
        - buy_inference_topup
      type: object
    OrgBillingPlan:
      additionalProperties: false
      properties:
        allowed_tiers:
          items:
            enum:
              - starter
              - pro
              - max
              - team
            type: string
          type: array
        credits_per_seat:
          format: int64
          type: integer
        has_subscription:
          type: boolean
        kind:
          enum:
            - personal
            - team
          type: string
        monthly_price_per_seat_usd:
          format: double
          type: number
        seat_count:
          format: int64
          type: integer
        seats:
          items:
            $ref: '#/components/schemas/BillingSeatMember'
          type: array
      required:
        - kind
        - allowed_tiers
        - seats
        - seat_count
        - has_subscription
        - monthly_price_per_seat_usd
        - credits_per_seat
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    BillingActionCapability:
      oneOf:
        - $ref: '#/components/schemas/BillingActionAvailable'
        - $ref: '#/components/schemas/BillingActionManagedElsewhere'
        - $ref: '#/components/schemas/BillingActionSubscriptionActive'
        - $ref: '#/components/schemas/BillingActionPaymentDelinquent'
        - $ref: '#/components/schemas/BillingActionUnavailable'
    BillingSeatMember:
      additionalProperties: false
      properties:
        display_name:
          type: string
        email:
          type: string
        user_id:
          type: string
      required:
        - user_id
        - email
      type: object
    BillingActionAvailable:
      additionalProperties: false
      properties:
        state:
          enum:
            - available
          type: string
        via:
          enum:
            - stripe_checkout
            - stripe_portal
            - store_purchase
            - store_customer_center
          type: string
      required:
        - state
        - via
      type: object
    BillingActionManagedElsewhere:
      additionalProperties: false
      properties:
        managed_by:
          enum:
            - stripe
            - app_store
            - play_store
          type: string
        reason:
          enum:
            - managed_elsewhere
          type: string
        state:
          enum:
            - unavailable
          type: string
      required:
        - state
        - reason
        - managed_by
      type: object
    BillingActionSubscriptionActive:
      additionalProperties: false
      properties:
        period_ends_at:
          format: date-time
          type: string
        reason:
          enum:
            - subscription_active
          type: string
        state:
          enum:
            - unavailable
          type: string
      required:
        - state
        - reason
        - period_ends_at
      type: object
    BillingActionPaymentDelinquent:
      additionalProperties: false
      properties:
        payment_state:
          enum:
            - blocked
            - past_due
            - unpaid
          type: string
        reason:
          enum:
            - payment_delinquent
          type: string
        state:
          enum:
            - unavailable
          type: string
      required:
        - state
        - reason
        - payment_state
      type: object
    BillingActionUnavailable:
      additionalProperties: false
      properties:
        reason:
          enum:
            - subscription_pending
            - checkout_pending
            - free_tier
            - enterprise_invoice
            - team_plan_web_only
            - team_seats_via_membership
            - web_only
            - no_billing_history
            - provider_unavailable
            - requires_org_admin
          type: string
        state:
          enum:
            - unavailable
          type: string
      required:
        - state
        - reason
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.