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

# Common API — Account Query

> Common API — Account Query (POST /{currency}/account/ledger): Query the account balance information for the current business and currency. Key request parameters include appId, sign.

> [!NOTE]
>
> All example requests on this page are based on the **sandbox (test) environment**. Please be careful to distinguish it from the production environment.

#### Secret Key & Private Key (Generate Signature)

## Related Topics

* [Common API](https://doc.haipay.net/en/history/V20260701/api/version2/CommonApi.md)
* [HaiPay API Reference Overview](https://doc.haipay.net/en/history/V20260701/api-reference/overview.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/en/history/V20260701/guide/config_settings_and_signature_rules_guide.md)
* [Account Inquiry](https://doc.haipay.net/en/operations/account-query.md)
* [Look Up API Response Structure and Error Codes](https://doc.haipay.net/en/history/V20260701/guide/error_response_appendix.md)


## OpenAPI

````yaml docs/en/api-reference/common/common.openapi.json POST /{currency}/account/ledger
openapi: 3.1.0
info:
  title: Common API
  description: >-
    HaiPay common APIs for account query, statement file download, payout
    voucher, exchange rate query, voucher PDF, and merchant payment config.
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /{currency}/account/ledger:
    post:
      tags: []
      summary: Account Query
      description: >-
        Query the account balance information for the current business and
        currency.
      parameters:
        - name: currency
          in: path
          description: >-
            Currency code (ISO 4217, three uppercase letters, e.g. USD, EUR,
            MXN)
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: >-
                    Business ID (obtained from the backend, must match the
                    currency in the URL)
                  format: int64
                sign:
                  type: string
                  description: Signature
              required:
                - appId
                - sign
            example:
              appId: 1054
              sign: >-
                af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status code
                  error:
                    type: string
                    description: Error code
                  msg:
                    type: string
                    description: Message
                  data:
                    type: object
                    properties:
                      bal:
                        type: string
                        description: Account balance
                      availableBal:
                        type: string
                        description: Available balance
                      frzBal:
                        type: string
                        description: Frozen balance
                      unSettleBal:
                        type: string
                        description: Unsettled balance
                      sign:
                        type: string
                        description: Signature
                    additionalProperties: false
              example:
                status: '1'
                error: '00000000'
                msg: success
                data:
                  bal: '50000.00'
                  availableBal: '45000.00'
                  frzBal: '3000.00'
                  unSettleBal: '2000.00'
                  sign: >-
                    af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
          headers: {}
      deprecated: false
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.