# Transfer Voucher Query

> Query and download the electronic voucher for a successful transfer.

```yaml
openapi: 3.1.0
info:
  title: Transfer Voucher Query
  version: 1.0.0
  description: Query and download the electronic voucher for a successful transfer.
paths:
  /api/v1/txn/queryVoucher:
    post:
      summary: Transfer Voucher Query
      description: Query and download the electronic voucher for a successful transfer.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. Retrieve it from the merchant
                    portal or onboarding material after your sandbox or
                    production account is created.
                requestId:
                  type: string
                  description: Merchant request ID used to look up the voucher.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Required when `payoutId` is not provided.
                payoutId:
                  type: string
                  description: Onerway payout ID used to look up the voucher.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Required when `requestId` is not provided.
                sign:
                  type: string
                  description: Request signature string. Generate it according to the Transfer
                    request-signing rules with your merchant private key.
              required:
                - merchantNo
                - sign
            examples:
              download-voucher:
                summary: Download a transfer voucher
                value:
                  merchantNo: "801129"
                  payoutId: "1984136974445449216"
                  sign: "{{SIGN}}"
      responses:
        "200":
          description: Voucher URL returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code returned by Onerway.
                  respMsg:
                    type:
                      - string
                      - "null"
                    description: Response message returned by Onerway.
                    x-onerway-value:
                      nullable: true
                      when:
                        en: No response message is returned.
                        zh: 未返回响应信息时为 `null`。
                  data:
                    type: object
                    properties:
                      requestId:
                        type: string
                        description: Merchant request ID.
                      payoutId:
                        type: string
                        description: Onerway payout ID.
                      voucherUrl:
                        type: string
                        description: Voucher download URL or voucher access location returned by
                          Onerway.
                    description: Voucher download result.
              examples:
                voucher-url-returned:
                  summary: Voucher URL returned
                  value:
                    respCode: "20000"
                    respMsg: null
                    data:
                      requestId: CYPW20251031055450
                      payoutId: "1984136974445449216"
                      voucherUrl: https://example.com/vouchers/1984136974445449216.pdf
```
