> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rolla.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Virtual Accounts

> Retrieves virtual accounts for receiving payments.

Retrieve virtual accounts for receiving payments. Filter by currency, account type, or integration type.

## Example Request

```bash theme={null}
curl -X GET "https://api.rolla.xyz/api/v1/external/wallet/virtual-accounts?currency=NGN&virtualAccountType=static" \
  -H "X-API-Key: your_api_key_here"
```

## Query Parameters

| Parameter            | Type   | Description                           |
| -------------------- | ------ | ------------------------------------- |
| `currency`           | string | Filter by 3-letter currency code      |
| `virtualAccountType` | string | Filter by type: `static` or `dynamic` |

## Example Response

```json theme={null}
{
  "status": 200,
  "success": true,
  "message": "Virtual accounts retrieved successfully",
  "data": {
    "virtualAccounts": [
      {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "status": "active",
        "virtual_account_type": "static",
        "currency_type": "fiat",
        "bank_name": "Wema Bank",
        "account_number": "9876543210",
        "account_name": "Rolla / Your Business Name"
      }
    ]
  }
}
```

<Info>
  **Static** virtual accounts are permanent and can receive multiple payments. **Dynamic** virtual accounts are created for a specific amount and expire after use.
</Info>


## OpenAPI

````yaml GET /wallet/virtual-accounts
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /wallet/virtual-accounts:
    get:
      summary: Get Virtual Accounts
      description: Retrieves virtual accounts for receiving payments.
      operationId: getVirtualAccounts
      parameters:
        - name: currency
          in: query
          description: Filter by 3-letter currency code
          schema:
            type: string
            minLength: 3
            maxLength: 3
        - name: virtualAccountType
          in: query
          description: Filter by account type
          schema:
            type: string
            enum:
              - static
              - dynamic
      responses:
        '200':
          description: Virtual accounts retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Virtual accounts retrieved successfully
                  data:
                    type: object
                    properties:
                      virtualAccounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/VirtualAccount'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    VirtualAccount:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Virtual account identifier
        accountName:
          type: string
          description: Account holder name
        accountNumber:
          type: string
          description: Virtual account number
        bankName:
          type: string
          description: Bank name
        currency:
          type: string
          description: Account currency
        type:
          type: string
          enum:
            - static
            - dynamic
          description: Account type (static or dynamic)
        status:
          type: string
          description: Account status
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````