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

# Voucher PDF/ZIP

> Generate payout voucher PDF files based on order numbers

<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

* [Common API](/docs/en/api/version2/CommonApi)
* [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/api-reference/common/common.openapi.json POST /common/voucher/pdf
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:
  /common/voucher/pdf:
    post:
      tags: []
      summary: Voucher PDF/ZIP
      description: >-
        Generate payout voucher PDF files based on order numbers (only when
        order status is Success or Failed). A single order returns a PDF file;
        multiple orders are packaged as a ZIP archive.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: Business ID (obtained from the backend)
                  format: int64
                orderNos:
                  type: array
                  items:
                    type: string
                  description: Payout order number list, at least 1, max 100
                getFee:
                  type: integer
                  description: 'Whether to display fee: 0=hide, 1=show, default: 0'
                isAmount:
                  type: integer
                  description: >-
                    Amount display mode: 0=actual credited amount, 1=order
                    amount, default: 0
                getSubject:
                  type: integer
                  description: 'Whether to display remark: 0=hide, 1=show, default: 0'
                lang:
                  type: string
                  description: 'Voucher language: zh/en, default: zh'
                sign:
                  type: string
                  description: Signature
              required:
                - appId
                - orderNos
                - sign
            examples: {}
        required: true
      responses:
        '200':
          description: >-
            Success: single order returns PDF (application/pdf), multiple orders
            return ZIP (application/zip)
          content:
            application/pdf:
              schema:
                type: string
                format: binary
                description: PDF file (single order)
            application/zip:
              schema:
                type: string
                format: binary
                description: ZIP archive (multiple orders)
          headers: {}
        '400':
          description: Parameter validation or signature error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status code
                  error:
                    type: string
                    description: Error code
                  msg:
                    type: string
                    description: Error message
                  data:
                    type: 'null'
      deprecated: false
      security: []

````