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

# 代付申请

> 创建美国美元（USD）代付订单，支持 PayPal、Venmo 电子钱包与 ACH 银行转账

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

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

## 相关主题

* [美国支付接口](https://doc.haipay.net/zh/payments/united-states.md)
* [支付方式一览表](https://doc.haipay.net/zh/payments/payment-methods.md)
* [HaiPay API 文档简介](https://doc.haipay.net/zh/api-reference/overview.md)
* [HaiPay 配置与签名指南](https://doc.haipay.net/zh/guide/signature-and-config.md)


## OpenAPI

````yaml zh/api-reference/usd/usd.openapi.json POST /usd/pay/apply
openapi: 3.0.1
info:
  title: 美国美元支付 API
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /usd/pay/apply:
    post:
      tags: []
      summary: 美国代付申请
      description: 创建美国美元（USD）代付订单，支持 PayPal、Venmo 电子钱包及 ACH 银行转账
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: 业务ID（后台获取，需要根据URL中的币种传递对应的业务ID）
                orderId:
                  type: string
                  description: 商户订单号(必须保证唯一性，长度不超过48)
                  maxLength: 48
                name:
                  type: string
                  description: >-
                    收款人姓名，推荐使用真实姓名，必须英文，不带特殊字符，以空格分割的，至少包含firstName和lastName，示例：John
                    Doe
                phone:
                  type: string
                  description: >-
                    真实手机号（纯数字，不带 + 号，暂不传国际区号 1，如 2025551234；格式参考
                    [电话号码格式说明](/zh/guide/faq)）
                email:
                  type: string
                  description: 真实电子邮件
                  format: email
                notifyUrl:
                  type: string
                  description: 回调地址
                  format: uri
                amount:
                  type: string
                  description: >-
                    交易金额（单位：美元，精确到小数点后两位；禁止添加标点符号，例如：","；PayPal / Venmo 限额 1 -
                    800 USD，ACH 限额 10 - 200000 USD）
                  pattern: ^\d+\.\d{2}$
                accountType:
                  type: string
                  description: 账户类型（EWALLET 或 BANK_ACCOUNT）
                  enum:
                    - EWALLET
                    - BANK_ACCOUNT
                bankCode:
                  type: string
                  description: >-
                    支付方式编码（PayPal、VENMO 或 ACH），详见
                    [支付方式（代付）](/zh/payments/united-states#bankCode)
                  enum:
                    - PayPal
                    - VENMO
                    - ACH
                subject:
                  type: string
                  description: 支付备注
                accountNo:
                  type: string
                  description: 收款账号；PayPal 传收款邮箱，VENMO 传收款账号，ACH 传收款银行账号
                identifyType:
                  type: string
                  description: 银行路由编码，ACH方式必填
                body:
                  type: string
                  description: 备注详情
                country:
                  type: string
                  description: 收款人所在国家，ACH方式必填，如美国为US
                address1:
                  type: string
                  description: 收款地址-详细街道，ACH方式必填
                address2:
                  type: string
                  description: 收款地址-城市，ACH方式必填
                address3:
                  type: string
                  description: 收款地址(省、州)，ACH方式必填
                postalCode:
                  type: string
                  description: 收款邮编，ACH方式必填
                bankName:
                  type: string
                  description: 银行名称，ACH方式必填
                swiftCode:
                  type: string
                  description: swiftCode，ACH方式必填
                partnerUserId:
                  type: string
                  description: >-
                    用户唯一标识（如用户ID userId），用于风控系统，必须真实有效，否则会影响交易。
                    格式要求：数字、大小写字母或常用符号-~!@#$%&*()_。
                  pattern: ^[A-Za-z0-9\-~!@#$%&*()_]+$
                sign:
                  type: string
                  description: 签名
              required:
                - appId
                - orderId
                - name
                - phone
                - email
                - amount
                - accountType
                - bankCode
                - subject
                - accountNo
                - partnerUserId
                - sign
            examples:
              paypal_payout:
                summary: PayPal 钱包代付
                value:
                  appId: 1054
                  orderId: M233323000059
                  amount: '200.00'
                  phone: '2025551234'
                  email: james.anderson@gmail.com
                  name: James Anderson
                  accountType: EWALLET
                  bankCode: PayPal
                  accountNo: james.anderson@gmail.com
                  subject: PayPal Payout M233323000059
                  partnerUserId: '149597870'
                  sign: af0gAHkUOyYH***
              venmo_payout:
                summary: Venmo 钱包代付
                value:
                  appId: 1054
                  orderId: M233323000060
                  amount: '150.00'
                  phone: '2025551234'
                  email: james.anderson@gmail.com
                  name: James Anderson
                  accountType: EWALLET
                  bankCode: VENMO
                  accountNo: james-anderson
                  subject: Venmo Payout M233323000060
                  partnerUserId: '149597870'
                  sign: af0gAHkUOyYH***
              ach_payout:
                summary: ACH 银行转账代付
                value:
                  appId: 1054
                  orderId: M233323000061
                  amount: '500.00'
                  phone: '2025551234'
                  email: james.anderson@gmail.com
                  name: James Anderson
                  accountType: BANK_ACCOUNT
                  bankCode: ACH
                  accountNo: '123456789012'
                  identifyType: '021000021'
                  country: US
                  address1: 350 Fifth Avenue
                  address2: New York
                  address3: NY
                  postalCode: '10118'
                  bankName: JPMorgan Chase Bank
                  swiftCode: CHASUS33
                  subject: ACH Payout M233323000061
                  partnerUserId: '149597870'
                  sign: af0gAHkUOyYH***
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: 状态码
                  error:
                    type: string
                    description: 错误码
                  msg:
                    type: string
                    description: 返回信息
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                        description: 商户订单号(必须保证唯一性)
                      orderNo:
                        type: string
                        description: 平台订单号
                      payUrl:
                        type: string
                        description: 支付链接
                      sign:
                        type: string
                        description: 签名
              examples:
                success:
                  summary: 成功
                  value:
                    status: '1'
                    error: '00000000'
                    msg: success
                    data:
                      orderId: M233323000059
                      orderNo: '6023071013539074'
                      payUrl: ''
                      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.