# Update Virtual Account

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/merchant-virtual-account/{virtualAccountId}:
    patch:
      summary: Update Virtual Account
      deprecated: false
      description: >-
        Use this API to update the details of an existing virtual account using
        the virtualAccountId. You can modify the description, expected amount,
        expiry time, notes, or close the virtual account by updating its status.
        Only the fields provided in the request will be updated; omitted fields
        remain unchanged.
      tags:
        - Payment Gateway/APIs - Payment Gateway /E-Collect
      parameters:
        - name: virtualAccountId
          in: path
          description: ''
          required: true
          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:
                description:
                  type: string
                  description: |
                    Updated description
                  nullable: true
                expectedAmount:
                  type: number
                  description: |
                    Updated expected amount
                  nullable: true
                closedBy:
                  type: string
                  description: |
                    Updated expiry date-time
                  nullable: true
                notes:
                  type: object
                  properties:
                    Key:Val:
                      type: string
                      nullable: true
                  x-apidog-orders:
                    - Key:Val
                  description: |
                    Updated key-value metadata
                  nullable: true
                virtualAccountStatus:
                  type: string
                  description: |
                    Status update
                  enum:
                    - ACTIVE
                    - CLOSED
                  x-apidog-enum:
                    - value: ACTIVE
                      name: ''
                      description: ''
                    - value: CLOSED
                      name: ''
                      description: ''
              x-apidog-orders:
                - description
                - expectedAmount
                - closedBy
                - notes
                - virtualAccountStatus
            examples:
              '1':
                value:
                  description: Updated rent
                  expectedAmount: 937.09
                  closedBy: '2026-07-01 23:59:59'
                  notes:
                    key1: value1
                  virtualAccountStatus: CLOSED
                summary: Example
              '2':
                value:
                  description: Marking account as active
                  virtualAccountStatus: ACTIVE
                summary: Mark VA as active/closed
              '3':
                value:
                  description: Increasing account closing date-time
                  closedBy: '2026-12-01 23:59:59'
                summary: Updating closedBy date/time
      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:
                      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
                          key2:
                            type: string
                        required:
                          - key1
                          - key2
                        x-apidog-orders:
                          - key1
                          - key2
                      expectedAmount:
                        type: integer
                    required:
                      - virtualAccountId
                      - merchantDetailId
                      - customerId
                      - customerName
                      - customerEmail
                      - customerPhone
                      - virtualAccountNumber
                      - virtualAccountIfscCode
                      - bankName
                      - customerAccountNumber
                      - customerUpiHandle
                      - customerIfscCode
                      - status
                      - closedOn
                      - description
                      - amountPaid
                      - notes
                      - expectedAmount
                    x-apidog-orders:
                      - virtualAccountId
                      - merchantDetailId
                      - customerId
                      - customerName
                      - customerEmail
                      - customerPhone
                      - virtualAccountNumber
                      - virtualAccountIfscCode
                      - bankName
                      - customerAccountNumber
                      - customerUpiHandle
                      - customerIfscCode
                      - status
                      - closedOn
                      - description
                      - amountPaid
                      - notes
                      - expectedAmount
                    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:
                  virtualAccountId: va_abc123
                  merchantDetailId: mdt_abc123
                  customerReferenceId: CUST7625367
                  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
                    key2: value2
                  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-36396437-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
