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

# List Stripe Subscriptions

> Admin/debug read for mirrored Stripe subscriptions. Use app-owned tables with RLS for end-user payment state.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/payments.yaml get /api/payments/stripe/{environment}/subscriptions
openapi: 3.0.3
info:
  title: Insforge Payments API
  version: 1.0.0
  description: >-
    Provider-specific Stripe and Razorpay payment setup, runtime flows, catalog
    management, sync, and webhook projections
servers: []
security: []
tags:
  - name: Stripe Payments
    description: >-
      Stripe Checkout, Billing Portal, catalog, sync, customer, subscription,
      and transaction routes
  - name: Razorpay Payments
    description: >-
      Razorpay Orders, Subscriptions, catalog, manual webhook setup, sync,
      customer, and transaction routes
  - name: Payment Webhooks
    description: Provider webhook ingestion routes
paths:
  /api/payments/stripe/{environment}/subscriptions:
    get:
      tags:
        - Stripe Payments
      summary: List Stripe Subscriptions
      description: >-
        Admin/debug read for mirrored Stripe subscriptions. Use app-owned tables
        with RLS for end-user payment state.
      parameters:
        - $ref: '#/components/parameters/EnvironmentPath'
        - $ref: '#/components/parameters/SubjectTypeQuery'
        - $ref: '#/components/parameters/SubjectIdQuery'
        - $ref: '#/components/parameters/LimitQuery'
      responses:
        '200':
          description: Stripe subscriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStripeSubscriptionsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - bearerAuth: []
        - apiKey: []
components:
  parameters:
    EnvironmentPath:
      name: environment
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/PaymentEnvironment'
      description: Payment provider environment.
    SubjectTypeQuery:
      name: subjectType
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 100
      description: Billing subject type. Must be provided together with subjectId.
      example: team
    SubjectIdQuery:
      name: subjectId
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 255
      description: Billing subject ID. Must be provided together with subjectType.
      example: team_123
    LimitQuery:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
      description: Maximum rows to return.
  schemas:
    ListStripeSubscriptionsResponse:
      type: object
      required:
        - subscriptions
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/StripeSubscription'
    PaymentEnvironment:
      type: string
      enum:
        - test
        - live
    StripeSubscription:
      type: object
      required:
        - environment
        - subscriptionId
        - customerId
        - subjectType
        - subjectId
        - status
        - currentPeriodStart
        - currentPeriodEnd
        - cancelAtPeriodEnd
        - cancelAt
        - canceledAt
        - trialStart
        - trialEnd
        - latestInvoiceId
        - metadata
        - syncedAt
        - createdAt
        - updatedAt
        - items
      properties:
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        subscriptionId:
          type: string
          example: sub_123
        customerId:
          type: string
          nullable: true
          example: cus_123
        subjectType:
          type: string
          nullable: true
        subjectId:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/StripeSubscriptionStatus'
        currentPeriodStart:
          type: string
          format: date-time
          nullable: true
        currentPeriodEnd:
          type: string
          format: date-time
          nullable: true
        cancelAtPeriodEnd:
          type: boolean
        cancelAt:
          type: string
          format: date-time
          nullable: true
        canceledAt:
          type: string
          format: date-time
          nullable: true
        trialStart:
          type: string
          format: date-time
          nullable: true
        trialEnd:
          type: string
          format: date-time
          nullable: true
        latestInvoiceId:
          type: string
          nullable: true
          example: in_123
        metadata:
          $ref: '#/components/schemas/Metadata'
        syncedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/StripeSubscriptionItem'
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          example: INVALID_INPUT
        message:
          type: string
          example: 'environment: Invalid enum value'
        statusCode:
          type: integer
          example: 400
        nextActions:
          type: string
          nullable: true
    StripeEnvironment:
      $ref: '#/components/schemas/PaymentEnvironment'
    StripeSubscriptionStatus:
      type: string
      enum:
        - incomplete
        - incomplete_expired
        - trialing
        - active
        - past_due
        - canceled
        - unpaid
        - paused
    Metadata:
      type: object
      additionalProperties:
        type: string
    StripeSubscriptionItem:
      type: object
      required:
        - environment
        - subscriptionItemId
        - subscriptionId
        - productId
        - priceId
        - quantity
        - metadata
        - createdAt
        - updatedAt
      properties:
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        subscriptionItemId:
          type: string
          example: si_123
        subscriptionId:
          type: string
          example: sub_123
        productId:
          type: string
          nullable: true
          example: prod_123
        priceId:
          type: string
          nullable: true
          example: price_123
        quantity:
          type: integer
          nullable: true
          example: 1
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````