> ## 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 Razorpay Subscriptions

> Admin/debug read for mirrored Razorpay 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/razorpay/{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/razorpay/{environment}/subscriptions:
    get:
      tags:
        - Razorpay Payments
      summary: List Razorpay Subscriptions
      description: >-
        Admin/debug read for mirrored Razorpay 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: Razorpay subscriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRazorpaySubscriptionsResponse'
        '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:
    ListRazorpaySubscriptionsResponse:
      type: object
      required:
        - subscriptions
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/RazorpaySubscription'
    PaymentEnvironment:
      type: string
      enum:
        - test
        - live
    RazorpaySubscription:
      type: object
      required:
        - environment
        - subscriptionId
        - planId
        - customerId
        - subjectType
        - subjectId
        - status
        - currentStart
        - currentEnd
        - endedAt
        - quantity
        - chargeAt
        - startAt
        - endAt
        - totalCount
        - authAttempts
        - paidCount
        - remainingCount
        - shortUrl
        - hasScheduledChanges
        - changeScheduledAt
        - offerId
        - authorizationPaymentId
        - authorizationVerifiedAt
        - notes
        - providerCreatedAt
        - syncedAt
        - createdAt
        - updatedAt
      properties:
        environment:
          $ref: '#/components/schemas/RazorpayEnvironment'
        subscriptionId:
          type: string
          example: sub_123
        planId:
          type: string
          example: plan_123
        customerId:
          type: string
          nullable: true
          example: cust_123
        subjectType:
          type: string
          nullable: true
        subjectId:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/RazorpaySubscriptionStatus'
        currentStart:
          type: string
          format: date-time
          nullable: true
        currentEnd:
          type: string
          format: date-time
          nullable: true
        endedAt:
          type: string
          format: date-time
          nullable: true
        quantity:
          type: integer
          nullable: true
        chargeAt:
          type: string
          format: date-time
          nullable: true
        startAt:
          type: string
          format: date-time
          nullable: true
        endAt:
          type: string
          format: date-time
          nullable: true
        totalCount:
          type: integer
          nullable: true
        authAttempts:
          type: integer
          nullable: true
        paidCount:
          type: integer
          nullable: true
        remainingCount:
          type: integer
          nullable: true
        shortUrl:
          type: string
          nullable: true
        hasScheduledChanges:
          type: boolean
        changeScheduledAt:
          type: string
          format: date-time
          nullable: true
        offerId:
          type: string
          nullable: true
        authorizationPaymentId:
          type: string
          nullable: true
          example: pay_123
        authorizationVerifiedAt:
          type: string
          format: date-time
          nullable: true
        notes:
          $ref: '#/components/schemas/Metadata'
        providerCreatedAt:
          type: string
          format: date-time
          nullable: true
        syncedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    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
    RazorpayEnvironment:
      $ref: '#/components/schemas/PaymentEnvironment'
    RazorpaySubscriptionStatus:
      type: string
      enum:
        - created
        - authenticated
        - active
        - pending
        - halted
        - cancelled
        - completed
        - expired
        - paused
    Metadata:
      type: object
      additionalProperties:
        type: string
  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

````