# 打款凭证查询

> 查询并下载成功打款对应的电子凭证。

```yaml
openapi: 3.1.0
info:
  title: 打款凭证查询
  version: 1.0.0
  description: 查询并下载成功打款对应的电子凭证。
paths:
  /api/v1/txn/queryVoucher:
    post:
      summary: 打款凭证查询
      description: 查询并下载成功打款对应的电子凭证。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Onerway 分配的商户号。通常在沙盒或生产商户开通后，从商户后台或开户材料中获取。
                requestId:
                  type: string
                  description: 用于查询打款凭证的商户请求流水号。
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - 当未提供 `payoutId` 时必填。
                payoutId:
                  type: string
                  description: 用于查询打款凭证的 Onerway 打款流水 ID。
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - 当未提供 `requestId` 时必填。
                sign:
                  type: string
                  description: 请求签名字符串，需使用商户私钥按 Transfer 请求签名规则生成。
              required:
                - merchantNo
                - sign
            examples:
              download-voucher:
                summary: 下载打款凭证
                value:
                  merchantNo: "801129"
                  payoutId: "1984136974445449216"
                  sign: "{{SIGN}}"
      responses:
        "200":
          description: 返回凭证下载地址
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Onerway 返回的响应码。
                  respMsg:
                    type:
                      - string
                      - "null"
                    description: Onerway 返回的响应信息。
                    x-onerway-value:
                      nullable: true
                      when:
                        en: No response message is returned.
                        zh: 未返回响应信息时为 `null`。
                  data:
                    type: object
                    properties:
                      requestId:
                        type: string
                        description: 商户请求流水号。
                      payoutId:
                        type: string
                        description: Onerway 打款流水 ID。
                      voucherUrl:
                        type: string
                        description: Onerway 返回的凭证下载地址或凭证访问位置。
                    description: 打款凭证查询结果。
              examples:
                voucher-url-returned:
                  summary: 返回凭证下载地址
                  value:
                    respCode: "20000"
                    respMsg: null
                    data:
                      requestId: CYPW20251031055450
                      payoutId: "1984136974445449216"
                      voucherUrl: https://example.com/vouchers/1984136974445449216.pdf
```
