> ## 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.

# Pause Razorpay Subscription

> Pause a Razorpay subscription immediately after evaluating the caller's UPDATE policy on payments.razorpay_subscriptions.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/payments.yaml post /api/payments/razorpay/{environment}/subscriptions/{subscriptionId}/pause
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/{subscriptionId}/pause:
    post:
      tags:
        - Razorpay Payments
      summary: Pause Razorpay Subscription
      description: >-
        Pause a Razorpay subscription immediately after evaluating the caller's
        UPDATE policy on payments.razorpay_subscriptions.
      parameters:
        - $ref: '#/components/parameters/EnvironmentPath'
        - $ref: '#/components/parameters/RazorpaySubscriptionIdPath'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PauseRazorpaySubscriptionBody'
      responses:
        '200':
          description: Razorpay subscription paused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PauseRazorpaySubscriptionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
components:
  parameters:
    EnvironmentPath:
      name: environment
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/PaymentEnvironment'
      description: Payment provider environment.
    RazorpaySubscriptionIdPath:
      name: subscriptionId
      in: path
      required: true
      schema:
        type: string
        minLength: 1
      description: Razorpay subscription ID.
      example: sub_123
  schemas:
    PauseRazorpaySubscriptionBody:
      type: object
      additionalProperties: false
    PauseRazorpaySubscriptionResponse:
      type: object
      required:
        - subscription
      properties:
        subscription:
          $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'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````