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

# 代收申请

> appId需使用墨西哥比索对应的，用户支付成功后增加墨西哥比索余额

<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">密钥私钥(生成签名)</h4>
    </div>

    <div />
  </div>

  <input id="secret-key" placeholder="密钥" class="px-3 py-2 border rounded-md" />

  <input id="private-key" placeholder="私钥" class="px-3 py-2 border rounded-md" />
</div>

## 相关主题

* [墨西哥支付接口](/docs/zh/api/version2/Mexico)
* [HaiPay API 文档简介](/docs/zh/api-reference/overview)
* [HaiPay 配置与签名指南](/docs/zh/guide/config_settings_and_signature_rules_guide)


## OpenAPI

````yaml docs/zh/V20260701/api-reference/mxn/mxn.openapi.json POST /mxn/collect/apply
openapi: 3.0.1
info:
  title: 默认模块
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /mxn/collect/apply:
    post:
      tags: []
      summary: 墨西哥比索代收申请
      description: appId需使用墨西哥比索对应的，用户支付成功后增加墨西哥比索余额
      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: >-
                    收款人姓名(收款人姓名格式:英文大小写且允许有空格,1-30位,"firstName middleName
                    lastName" (middleName非必填,特殊字符支持'.-)
                  minLength: 1
                  maxLength: 30
                  pattern: ^[A-Za-z\s'.\-]+$
                phone:
                  type: string
                  description: 真实手机号（格式参考 电话号码格式 ）
                email:
                  type: string
                  description: 真实电子邮件
                  format: email
                amount:
                  type: string
                  description: 交易金额(单位：Mex$，精确到小数点后两位；禁止添加标点符号，例如：","）
                  pattern: ^\d+\.\d{2}$
                payType:
                  type: string
                  description: 用户支付方式：QR（条形码支付）或 VA（虚拟账户）
                  enum:
                    - QR
                    - VA
                inBankCode:
                  type: string
                  description: >-
                    收款编码，当payType为QR时，inBankCode支持：OXXO、CASH
                    支付方式；当payType为VA时，inBankCode为CLABE
                callBackUrl:
                  type: string
                  description: 用户支付成功后跳转地址
                  format: uri
                callBackFailUrl:
                  type: string
                  description: 用户支付失败后跳转地址
                  format: uri
                cancelUrl:
                  type: string
                  description: 用户取消支付URL，如果传递，用户可在支付页面点击返回到此页面
                  format: uri
                notifyUrl:
                  type: string
                  description: 回调地址
                  format: uri
                subject:
                  type: string
                  description: 支付备注
                body:
                  type: string
                  description: 备注详情
                partnerUserId:
                  type: string
                  description: >-
                    用户唯一标识（如用户ID userId），用于风控系统，必须真实有效，否则会影响交易。
                    格式要求：数字、大小写字母或常用符号-~!@#$%&*()_。
                  pattern: ^[A-Za-z0-9\-~!@#$%&*()_]+$
                sign:
                  type: string
                  description: 签名
              required:
                - appId
                - orderId
                - name
                - phone
                - email
                - amount
                - payType
                - inBankCode
                - callBackUrl
                - callBackFailUrl
                - partnerUserId
                - sign
            example:
              amount: '20.00'
              callBackFailUrl: https://www.example.com/failed
              payType: QR
              callBackUrl: https://www.example.com/success
              inBankCode: CASH
              orderId: SINGLE_1763358741905
              phone: '1234567890'
              appId: '4755'
              name: TEST NAME
              partnerUserId: dfff@fg43123
              sign: >-
                Si8+iTS7zZ4oX1bMCZ9PPFoJwgw9mGEwMc1UIADOrbs7xlCL+f5e+OYcvhKa4HXCxybqu6MTft6t6Smy9gvu8bPw/erwHdKbP/QzRDU5qHfMj9+1IZzZvJQJR/i5/TW9Y+L4xkOOsaTXfEYuDsZTjyNqy/si5EbUgl1CzVMuH3BORpB7H2f0P34RHqt8t5SZet7YfZLs+dcriczmqHAKhILHgIc7VHSfiAna00J2KjM93qO6kXa8LIjw7FVbX5f6ZMOUjrl13M3DDx01qSW0JVCSxRqEN9yTYTPMV8eFCSk+Picr78/vyMEKnRjnccUx4OZy1cK/9rIfi538xTEAbQ==
              email: test.single@example.com
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                        description: 商户订单号(必须保证唯一性)
                      orderNo:
                        type: string
                        description: 平台订单号
                      payUrl:
                        type: string
                        description: 支付地址（QR返回条形码支付地址，VA返回CLABE虚拟账户支付地址）
                      bankCode:
                        type: string
                        description: 通道Code(QR返回条形码，VA返回CLABE)
                      qrCode:
                        type: string
                        description: 条形码，返回的是条形码的编号（仅QR支付返回）
                      bankNo:
                        type: string
                        description: CLABE虚拟账户号码（仅VA支付返回）
                      bankUserName:
                        type: string
                        description: 账户名称（仅VA支付返回）
                      sign:
                        type: string
                        description: 签名
              example:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: SINGLE_1763358111905
                  orderNo: '2025111713522220822'
                  payUrl: >-
                    https://www.paycashglobal.com/formato.php?referencia=MTQ3MTMyNDEwMjQzNQ==&interno=1
                  bankCode: CASH
                  qrCode: '1471324102431'
                  sign: >-
                    mpcB0wfbvGpCSNbT8Gs+D4Tt1eMDqTgnuY6yVUAdemccC07nnWrxSPk4srHFXeoXpdWm+CKFh89rghU16kZq2pm9dw0jSlns0dj5c7sDO8Te0KMNGfleuQ+N/16sGZr/LE7MAWj6Z902ymiff6q+N1ljTfIDypHTztbGDpJvemZ9OkB2BCemsoAX6ukkXyZJPI+gkyJEDCPfOcWfXeNmdWOKxyXLOJEjIBno2oyZoDs3yJqkMtCyQW1cjgTTOQbnxgCjHV9YQ+OcLVdkFroC/HrP8p9c8qRICDX/NMEt4Z0Zo1eBV07rkebuY60+A1kSuD7axO0UxSq6BbXKjgNqyQ==
          headers: {}
      deprecated: false
      security: []

````