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

# 巴林 — 代收查询（历史导航 V20260628）

> 历史版本（V20260628）巴林 — 代收查询（历史导航 V20260628）接口（POST /bhd/collect/query），请求参数包含 orderId 与签名字段，返回订单状态与交易结果。

> [!NOTE]
>
> 本页所有示例请求均基于**沙盒（测试）环境**，请注意区分正式环境。

#### 密钥私钥(生成签名)

## 相关主题

* [巴林支付接口](https://doc.haipay.net/zh/history/V20260628/api/version2/Bahrain.md)
* [HaiPay API 文档简介](https://doc.haipay.net/zh/history/V20260628/api-reference/overview.md)
* [HaiPay 配置与签名指南](https://doc.haipay.net/zh/history/V20260628/guide/config_settings_and_signature_rules_guide.md)


## OpenAPI

````yaml docs/zh/api-reference/bhd/bhd.openapi.json POST /bhd/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:
  /bhd/collect/query:
    post:
      tags: []
      summary: 巴林第纳尔代收查询
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: 业务ID（后台获取，需要根据URL中的币种传递对应的业务ID）
                orderId:
                  type: string
                  description: 商户订单号
                orderNo:
                  type: string
                  description: 平台订单号（响应快）
                sign:
                  type: string
                  description: 签名
              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: 状态码
                    default: ''
                  error:
                    type: string
                    description: 错误码
                    default: ''
                  msg:
                    type: string
                    description: 消息
                    default: ''
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                        description: 商户订单号(必须保证唯一性)
                        default: ''
                      orderNo:
                        type: string
                        description: 平台订单号
                        default: ''
                      amount:
                        type: string
                        description: 交易金额
                        default: ''
                      actualAmount:
                        type: string
                        description: 收到金额
                        default: ''
                      fee:
                        type: string
                        description: 手续费
                        default: ''
                      status:
                        type: integer
                        description: 状态(0未开始，1支付中，2成功（终态），3失败（终态）, -1异常待确认)
                        default: 0
                      payTime:
                        type: string
                        description: '支付成功时间（当status=2时有值）(沙特时间), 格式: yyyy-MM-dd HH:mm:ss'
                        default: ''
                      errorMsg:
                        type: string
                        description: 支付失败原因（当status=3时有值）
                        default: ''
                      sign:
                        type: string
                        description: 签名
                        default: ''
                    additionalProperties: false
                    description: 数据对象
                    default: {}
                additionalProperties: false
              examples:
                success:
                  summary: 成功
                  value:
                    status: '1'
                    error: '00000000'
                    msg: success
                    data:
                      orderId: M233323000059
                      orderNo: '6023071013539074'
                      amount: '300.00'
                      actualAmount: '300.00'
                      fee: '0.00'
                      status: 2
                      payTime: '2026-09-14 15:30:00'
                      errorMsg: ''
                      sign: >-
                        af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
                param_error:
                  summary: 参数校验失败
                  value:
                    status: '0'
                    error: '1001'
                    msg: orderId can not blank
                    data: null
                sign_error:
                  summary: 签名错误
                  value:
                    status: '0'
                    error: '1002'
                    msg: Invalid request signature
                    data: null
          headers: {}
      deprecated: false
      security: []

````

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