> ## 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.

# Collection Query

<Note>All example requests on this page are based on the **sandbox (test) environment**. Please be careful to distinguish it from the production environment.</Note>

<div class="flex flex-col gap-4">
  <div class="api-section-heading flex flex-col gap-y-4 w-full">
    <div class="flex items-baseline border-b pb-2.5 border-gray-100 dark:border-gray-800 w-full">
      <h4 class="api-section-heading-title flex-1 mb-0">Secret Key & Private Key (Generate Signature)</h4>
    </div>

    <div />
  </div>

  <input id="secret-key" placeholder="Secret Key" class="px-3 py-2 border rounded-md" />

  <input id="private-key" placeholder="Private Key" class="px-3 py-2 border rounded-md" />
</div>

## Related Topics

* [Malaysia](/docs/en/V20260701/api/version2/Malaysia)
* [HaiPay API Reference Overview](/docs/en/api-reference/overview)
* [HaiPay Configuration and Signature Guide](/docs/en/guide/config_settings_and_signature_rules_guide)


## OpenAPI

````yaml docs/en/V20260701/api-reference/myr/myr.openapi.json POST /myr/collect/query
openapi: 3.0.1
info:
  title: 默认模块
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /myr/collect/query:
    post:
      tags: []
      summary: MYR Collection Query
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: >-
                    Business ID (obtained from backend, must pass the
                    corresponding business ID according to the currency in the
                    URL)
                orderId:
                  type: string
                  description: Merchant order number
                orderNo:
                  type: string
                  description: Platform order number (faster response)
                sign:
                  type: string
                  description: Signature
              required:
                - appId
                - orderId
                - sign
            example:
              appId: 1054
              orderId: M233323000059
              orderNo: P233323000059
              sign: >-
                af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '1: Normal, 0: Exception'
                  error:
                    type: string
                    description: Error code
                  msg:
                    type: string
                    description: Error description
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                        description: Merchant order number (must be unique)
                      orderNo:
                        type: string
                        description: Platform order number
                      amount:
                        type: string
                        description: Transaction amount
                      actualAmount:
                        type: string
                        description: Received amount
                      fee:
                        type: string
                        description: Fee
                      status:
                        type: integer
                        description: >-
                          Status (0 = Not started, 1 = Processing, 2 = Success
                          (final), 3 = Failed (final), -1 = Exception pending
                          confirmation)
                      payTime:
                        type: string
                        pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
                        description: >-
                          Payment success time (exists when status=2) (Malaysia
                          Time), format: yyyy-MM-dd HH:mm:ss
                      errorMsg:
                        type: string
                        description: Failure reason (exists when status=3)
                      sign:
                        type: string
                        description: Signature
                    additionalProperties: false
                    description: ''
                additionalProperties: false
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    error: '00000000'
                    msg: success
                    data:
                      orderId: M233323000059
                      orderNo: '6023071013539074'
                      amount: '100.00'
                      actualAmount: '99.50'
                      fee: '0.50'
                      status: 1
                      payTime: '2025-07-30 14:30:00'
                      errorMsg: ''
                      sign: >-
                        af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
                param_error:
                  summary: Parameter validation failed
                  value:
                    status: '0'
                    error: '1001'
                    msg: orderId can not blank
                    data: null
                sign_error:
                  summary: Signature error
                  value:
                    status: '0'
                    error: '1002'
                    msg: Invalid request signature
                    data: null
      deprecated: false
      security: []

````

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