# Search Virtual Account

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/merchant-virtual-account/search:
    post:
      summary: Search Virtual Account
      deprecated: false
      description: >-
        Use this API to search and retrieve a list of virtual accounts based on
        filter criteria such as customer ID, virtual account number, status,
        amount range, and date ranges. Supports pagination to control the number
        of records returned.
      tags:
        - Payment Gateway/APIs - Payment Gateway /E-Collect
      parameters:
        - name: offset
          in: query
          description: |
            Page offset
          required: false
          example: 0
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Records per page
          required: false
          example: 50
          schema:
            type: integer
        - name: orderBy
          in: query
          description: |
            Sort field
          required: false
          example: id
          schema:
            type: string
        - name: direction
          in: query
          description: |
            Sort direction (ASC/DESC)
          required: false
          example: ASC
          schema:
            type: string
        - name: Authorization
          in: header
          description: Token generated with your Access key and secret key
          required: true
          example: Bearer jIR6lhjFvimVkjNUMEhPWpsnCiI
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customerId:
                  type: string
                  description: |
                    Filter by customer ID
                closedByFrom:
                  type: string
                  description: |
                    Close-by range start
                closedByTo:
                  type: string
                  description: |
                    Close-by range end
                virtualAccountStatus:
                  type: string
                  description: |
                    Filter by status
                amountPaidFrom:
                  type: integer
                  description: |
                    Amount paid range start
                amountPaidTo:
                  type: integer
                  description: |
                    Amount paid range end
                virtualAccountNumber:
                  type: string
                  description: |
                    Filter by VA number
                createdOnFrom:
                  type: string
                  description: |
                    Created date range start
                createdOnTo:
                  type: string
                  description: |
                    Created date range end
                customerReferenceId:
                  type: string
                  description: Exact match on merchant reference
              x-apidog-orders:
                - customerId
                - customerReferenceId
                - closedByFrom
                - closedByTo
                - virtualAccountStatus
                - amountPaidFrom
                - amountPaidTo
                - virtualAccountNumber
                - createdOnFrom
                - createdOnTo
            example:
              customerId: string
              customerReferenceId: CUST7625367
              closedByFrom: '2026-01-01 00:00:00'
              closedByTo: '2026-12-31 23:59:59'
              virtualAccountStatus: ACTIVE
              amountPaidFrom: 100
              amountPaidTo: 10000
              virtualAccountNumber: NBS123BQ89S4VYP52Z
              createdOnFrom: '2026-01-01 00:00:00'
              createdOnTo: '2026-12-31 23:59:59'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_code:
                    type: integer
                    description: Application-level status code
                  response_message:
                    type: string
                    description: High-level status description.
                  payload:
                    type: object
                    properties:
                      recordsCount:
                        type: integer
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            virtualAccountId:
                              type: string
                            merchantDetailId:
                              type: string
                            customerId:
                              type: string
                            customerName:
                              type: string
                            customerEmail:
                              type: string
                            customerPhone:
                              type: string
                            virtualAccountNumber:
                              type: string
                            virtualAccountIfscCode:
                              type: string
                            bankName:
                              type: string
                            customerAccountNumber:
                              type: string
                            customerUpiHandle:
                              type: string
                            customerIfscCode:
                              type: string
                            status:
                              type: string
                            closedOn:
                              type: string
                            description:
                              type: string
                            amountPaid:
                              type: integer
                            notes:
                              type: object
                              properties:
                                key1:
                                  type: string
                              required:
                                - key1
                              x-apidog-orders:
                                - key1
                            expectedAmount:
                              type: integer
                          x-apidog-orders:
                            - virtualAccountId
                            - merchantDetailId
                            - customerId
                            - customerName
                            - customerEmail
                            - customerPhone
                            - virtualAccountNumber
                            - virtualAccountIfscCode
                            - bankName
                            - customerAccountNumber
                            - customerUpiHandle
                            - customerIfscCode
                            - status
                            - closedOn
                            - description
                            - amountPaid
                            - notes
                            - expectedAmount
                    required:
                      - recordsCount
                      - data
                    x-apidog-orders:
                      - recordsCount
                      - data
                    description: Contains Virtual Account related response data.
                required:
                  - response_code
                  - response_message
                  - payload
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
              example:
                response_code: 0
                response_message: SUCCESS
                payload:
                  recordsCount: 42
                  data:
                    - virtualAccountId: va_abc123
                      merchantDetailId: mdt_abc123
                      customerId: cust_001
                      customerName: John Doe
                      customerEmail: john@example.com
                      customerPhone: '9876543210'
                      virtualAccountNumber: VA00001234
                      virtualAccountIfscCode: RATN0VAAPIS
                      bankName: RBL Bank
                      customerAccountNumber: '9876543210123'
                      customerUpiHandle: john@upi
                      customerIfscCode: SBIN0001234
                      status: ACTIVE
                      closedOn: '2026-06-01 23:59:59'
                      description: Monthly rent
                      amountPaid: 3000
                      notes:
                        key1: value1
                      expectedAmount: 5000
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /E-Collect
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-36589646-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
