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

# Query Wallets

> Inquiry the wallet balance.

The following input parameters are expected to be provided by the merchant to retrieve the wallet balances.



## OpenAPI

````yaml /openapi.json post /api/services/app/PaymentGateway/QueryWallets
openapi: 3.0.1
info:
  title: CommercePay API
  version: v1
  description: >
    ---

    **Credentials Accounts**


    Every account is provided with separate keys for testing and for running
    live transactions. Once the merchant application has been approved,
    developers can begin the process of integrating the CommercePay API. The
    following details will be provided to get started with the integration. 


    <a href="https://docs.commercepay.asia/docs/api/d19b0f3289ae0-get-started"
    target="_blank">Get Started</a>
  contact: {}
servers:
  - description: Staging
    url: https://staging-payments.commerce.asia
  - url: https://payments.commerce.asia
    description: Production
security: []
paths:
  /api/services/app/PaymentGateway/QueryWallets:
    post:
      tags:
        - PaymentGateway
      summary: Query Wallets
      description: "Inquiry the wallet balance.\r\n\r\nThe following input parameters are expected to be provided by the merchant to retrieve the wallet balances."
      operationId: get-api-services-app-PaymentGateway-QueryWallets
      parameters:
        - $ref: '#/components/parameters/AbpTenantId'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/CapSignature'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryWalletInputDto'
      responses:
        '200':
          description: Success
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryWalletOutputDto'
              examples:
                Example 1:
                  value:
                    tenantId: 0
                    tenantName: string
                    wallets:
                      - currencyCode: MYR
                        balance: 0
                        walletType: 0
                        walletStatus: 0
        '400':
          description: " - Tenant not found\r\n - Tenant wallet not found"
components:
  parameters:
    AbpTenantId:
      schema:
        type: string
      in: header
      name: Abp-TenantId
      required: true
      description: Your unique Merchant ID assigned by CommercePay.
    Authorization:
      schema:
        type: string
      in: header
      name: Authorization
      required: true
      description: Your API credentials used for authentication (typically a Bearer token).
    CapSignature:
      schema:
        type: string
      in: header
      name: cap-signature
      required: true
      description: >-
        A unique security hash used to verify the integrity of the request body.
        See [Generate Signature](/docs/generate-signature) for how to generate
        this.
  schemas:
    QueryWalletInputDto:
      title: QueryWalletInputDto
      type: object
      required:
        - tenantId
        - timestamp
      properties:
        tenantId:
          type: integer
          description: Fill in provided Tenant Id
        timestamp:
          type: integer
          format: int64
          description: new Date().getTime()
          example: 1621851652617
    QueryWalletOutputDto:
      title: QueryWalletOutputDto
      type: object
      properties:
        tenantId:
          type: integer
        tenantName:
          type: string
        wallets:
          type: array
          items:
            $ref: '#/components/schemas/WalletDetailDto'
    WalletDetailDto:
      title: WalletDetailDto
      type: object
      properties:
        currencyCode:
          type: string
          description: Currency code with a 3-letter ISO 4217 standard code
          maxLength: 3
          example: MYR
        balance:
          type: number
          format: double
          description: Wallet Balance
          example: 1000
        walletType:
          $ref: '#/components/schemas/WalletType'
        walletStatus:
          $ref: '#/components/schemas/WalletStatus'
    WalletType:
      title: WalletType
      description: Basic = 0 , Premium = 1 , Payout = 2
      enum:
        - 0
        - 1
        - 2
    WalletStatus:
      title: WalletStatus
      enum:
        - 0
        - 1
        - 2
      description: InActive = 0 , Active = 1 , Suspend = 2

````