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

> Admin/debug read for mirrored Razorpay customers. This is a display mirror only and should not replace app-owned billing tables.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/payments.yaml get /api/payments/razorpay/{environment}/customers
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}/customers:
    get:
      tags:
        - Razorpay Payments
      summary: List Razorpay Customers
      description: >-
        Admin/debug read for mirrored Razorpay customers. This is a display
        mirror only and should not replace app-owned billing tables.
      parameters:
        - $ref: '#/components/parameters/EnvironmentPath'
        - $ref: '#/components/parameters/LimitQuery'
      responses:
        '200':
          description: Razorpay customers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentCustomersResponse'
        '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.
    LimitQuery:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
      description: Maximum rows to return.
  schemas:
    ListPaymentCustomersResponse:
      type: object
      required:
        - customers
      properties:
        customers:
          type: array
          items:
            $ref: '#/components/schemas/PaymentCustomerListItem'
    PaymentEnvironment:
      type: string
      enum:
        - test
        - live
    PaymentCustomerListItem:
      allOf:
        - $ref: '#/components/schemas/PaymentCustomer'
        - type: object
          required:
            - paymentsCount
            - lastPaymentAt
            - totalSpend
            - totalSpendCurrency
            - paymentMethodBrand
            - paymentMethodLast4
            - countryCode
          properties:
            paymentsCount:
              type: integer
              minimum: 0
            lastPaymentAt:
              type: string
              format: date-time
              nullable: true
            totalSpend:
              type: integer
              minimum: 0
              nullable: true
            totalSpendCurrency:
              type: string
              nullable: true
            paymentMethodBrand:
              type: string
              nullable: true
            paymentMethodLast4:
              type: string
              nullable: true
            countryCode:
              type: string
              nullable: true
              minLength: 2
              maxLength: 2
    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
    PaymentCustomer:
      type: object
      required:
        - environment
        - provider
        - providerCustomerId
        - email
        - name
        - phone
        - deleted
        - metadata
        - providerCreatedAt
        - syncedAt
      properties:
        environment:
          $ref: '#/components/schemas/PaymentEnvironment'
        provider:
          $ref: '#/components/schemas/PaymentProvider'
        providerCustomerId:
          type: string
          example: cus_123
        email:
          type: string
          nullable: true
          example: buyer@example.com
        name:
          type: string
          nullable: true
          example: Buyer Example
        phone:
          type: string
          nullable: true
          example: +1 555-0100
        deleted:
          type: boolean
        metadata:
          $ref: '#/components/schemas/Metadata'
        providerCreatedAt:
          type: string
          format: date-time
          nullable: true
        syncedAt:
          type: string
          format: date-time
    PaymentProvider:
      type: string
      enum:
        - stripe
        - razorpay
    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

````