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

# 墨西哥 — 代收申请（历史导航 V20260628）

> 历史版本（V20260628）墨西哥 — 代收申请（历史导航 V20260628）（POST /mxn/collect/apply）：appId需使用墨西哥比索对应的，用户支付成功后增加墨西哥比索余额；关键请求参数含 orderId、name、phone、email。

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

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

## 相关主题

* [墨西哥支付接口](https://doc.haipay.net/zh/history/V20260628/api/version2/Mexico.md)
* [HaiPay API 文档简介](https://doc.haipay.net/zh/history/V20260628/api-reference/overview.md)
* [HaiPay 配置与签名指南](https://doc.haipay.net/zh/history/V20260628/guide/config_settings_and_signature_rules_guide.md)


## OpenAPI

````yaml docs/zh/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
                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
            examples:
              qr_payment:
                summary: QR支付
                value:
                  amount: '20.00'
                  callBackFailUrl: https://shop.merchant.com/payment/failed
                  payType: QR
                  callBackUrl: https://shop.merchant.com/payment/success
                  inBankCode: CASH
                  orderId: ORD-20260914-00001
                  phone: '5512345678'
                  appId: '4755'
                  name: Carlos Mendoza Ruiz
                  partnerUserId: USER_830127
                  sign: >-
                    Si8+iTS7zZ4oX1bMCZ9PPFoJwgw9mGEwMc1UIADOrbs7xlCL+f5e+OYcvhKa4HXCxybqu6MTft6t6Smy9gvu8bPw/erwHdKbP/QzRDU5qHfMj9+1IZzZvJQJR/i5/TW9Y+L4xkOOsaTXfEYuDsZTjyNqy/si5EbUgl1CzVMuH3BORpB7H2f0P34RHqt8t5SZet7YfZLs+dcriczmqHAKhILHgIc7VHSfiAna00J2KjM93qO6kXa8LIjw7FVbX5f6ZMOUjrl13M3DDx01qSW0JVCSxRqEN9yTYTPMV8eFCSk+Picr78/vyMEKnRjnccUx4OZy1cK/9rIfi538xTEAbQ==
                  email: carlos.mendoza@gmail.com
              va_payment:
                summary: VA支付示例
                value:
                  appId: '4755'
                  orderId: ORD-20260914-00002
                  payType: VA
                  inBankCode: CLABE
                  amount: '43.43'
                  name: Sofía López Martínez
                  email: carlos.mendoza@gmail.com
                  callBackUrl: https://shop.merchant.com/payment/success
                  callBackFailUrl: https://shop.merchant.com/payment/failed
                  partnerUserId: USER_830127
                  sign: >-
                    hYNVZTSCTWeR8X0HfhQ2zxoCTeM5ilX8tElAaNbfGDNzjpklR6r/LQZQ/IEO6SQvAc7EdKnAObcBhOxoUvQbeUNy1o8xcp4TV8ZX32McBPbAB/fu+lPF2SbtahoFs3W5w4Gg3ZMa9nLsStP6m1qER7rfaBOBDmGjUIbwDXUaXYwhLKVepB4N9dmE/r9/kch3SKXkFD/2NlT7HgN4CSWKTr04dd7awgYZm6PFlL9U3F0ZvgCEJouNBezNu2fuVz1ylgPtsXTKn2xLgCekrvwG+9WmQPnQzUC5kVlyLGpKvyVK9EMgHHTfg/12Lu1fyxcqLY8Zm/RAU55lAs/kxLQvpQ==
        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: 支付方式编码(QR返回条形码，VA返回CLABE)
                      qrCode:
                        type: string
                        description: 条形码，返回的是条形码的编号（仅QR支付返回）
                      bankNo:
                        type: string
                        description: CLABE虚拟账户号码（仅VA支付返回）
                      bankUserName:
                        type: string
                        description: 账户名称（仅VA支付返回）
                      sign:
                        type: string
                        description: 签名
              examples:
                qr_payment:
                  summary: QR支付
                  value:
                    status: '1'
                    error: '00000000'
                    msg: ''
                    data:
                      orderId: ORD-20260914-00003
                      orderNo: '2025111713522220822'
                      payUrl: https://pay.haipay.asia/cashier/1L9zQS2
                      bankCode: CASH
                      qrCode: '1471324102431'
                      sign: >-
                        mpcB0wfbvGpCSNbT8Gs+D4Tt1eMDqTgnuY6yVUAdemccC07nnWrxSPk4srHFXeoXpdWm+CKFh89rghU16kZq2pm9dw0jSlns0dj5c7sDO8Te0KMNGfleuQ+N/16sGZr/LE7MAWj6Z902ymiff6q+N1ljTfIDypHTztbGDpJvemZ9OkB2BCemsoAX6ukkXyZJPI+gkyJEDCPfOcWfXeNmdWOKxyXLOJEjIBno2oyZoDs3yJqkMtCyQW1cjgTTOQbnxgCjHV9YQ+OcLVdkFroC/HrP8p9c8qRICDX/NMEt4Z0Zo1eBV07rkebuY60+A1kSuD7axO0UxSq6BbXKjgNqyQ==
                va_payment:
                  summary: VA支付
                  value:
                    status: '1'
                    error: '00000000'
                    msg: ''
                    data:
                      orderId: ORD-20260914-00002
                      orderNo: '2025111713522220823'
                      payUrl: https://pay.haipay.asia/cashier/1L9zQS2
                      bankCode: CLABE
                      bankNo: '684180292019844000'
                      bankUserName: Sofía López Martínez
                      sign: >-
                        QwXUII9P895b0008Avsep0OqxuxuQai56vAP1ks1saVJnT/hIWiE9rM4i5uI1CQ0yGNGVkVV25evO+7MssalgWqQNr0tTE0RHCJ6nK0baNz680CHp4IFxLp5TV4OLlNpLfyTNxiYLu4TzsFQuOAsDyTzOH6LnBBLC+syn1S8r4OkkcxrjDnonPc6E4wPZyJouiXe7+cxvSWxl+QSn8dXudxBVddhhTbiwJb2+ATZTDDMmeD7BlU9e8x8IKlR9j7l9Xa4hGU/GRvBqNAIhHXiQVldIlOP1I5L9Ez78kty8dyB2+YIgm5q2gRyl+XotAlOjq8cWti4dau1B7gi3bfqtw==
                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.