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

# 墨西哥 — 代付申请（历史导航 V20260701）

> 历史版本（V20260701）墨西哥 — 代付申请（历史导航 V20260701）（POST /mxn/pay/apply）：创建代付订单说明：appId 墨西哥比索， amount 墨西哥比索，实收结算墨西哥比索；关键请求参数含 orderId、amount、accountType、bankCode。

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

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

## 相关主题

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


## OpenAPI

````yaml docs/zh/api-reference/mxn/mxn.openapi.json POST /mxn/pay/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/pay/apply:
    post:
      tags: []
      summary: 墨西哥比索代付申请
      description: |-
        创建代付订单

        说明：appId 墨西哥比索， amount 墨西哥比索，实收结算墨西哥比索
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: 业务ID（后台获取，需要根据URL中的币种传递对应的业务ID）
                orderId:
                  type: string
                  description: 商户订单号(必须保证唯一性，长度不超过48)
                  maxLength: 48
                amount:
                  type: string
                  description: 交易金额（单位：Mex$，精确到小数点后两位；禁止添加标点符号，例如：","）
                  pattern: ^\d+\.\d{2}$
                accountType:
                  type: string
                  description: 账户类型：BANK_CARD（借记卡（长度16位） , BANK_ACCOUNT（CLABE（长度18位））
                  enum:
                    - BANK_CARD
                    - BANK_ACCOUNT
                bankCode:
                  type: string
                  description: 银行代码具体值查看 完整银行编码列表
                accountNo:
                  type: string
                  description: 用户银行账号
                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
                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
                - amount
                - accountType
                - bankCode
                - accountNo
                - name
                - email
                - partnerUserId
                - sign
              additionalProperties: false
            example:
              appId: 1054
              orderId: M100000450012
              amount: '1500.00'
              accountType: BANK_ACCOUNT
              bankCode: STP
              accountNo: 99418029201a844099
              name: Carlos Mendoza Ruiz
              email: carlos.mendoza@gmail.com
              subject: Payment for services
              body: Payment description
              partnerUserId: USER_450921
              sign: >-
                I1PeK3eJEVsFFNowxVRqMXpeWa1lr/BcRpBi8SsW4wVo1+5AC1JsrFq/m/L3214NzKHvtDWi4zia3DL3dPut0yMyUyqL91LNCSaeISbGsQPlhEsQpyTOryS/RKOfsrn2Xo37SCF/phAvndOk2jwwGwqM5xLz1ms9Ukl85wv27QFNrXIMxK2p181e7MpMYrgf+xvEBE/VqCtKMtN9pO449wWwXzHWNPbZ76s4pAvKwRE9yXQDr7Iw14Dktcnl1FoLM4gWM/obkO+mz6SyAGDuXhVh/+OD/IGNiCyTCNq6ciQY28UnCFV6ZIP40gxsFhfBJKbK+Raw7y1Bh912ifYfug==
        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: 平台订单号
                      sign:
                        type: string
                        description: 签名
              examples:
                success:
                  summary: 成功
                  value:
                    status: '1'
                    error: '00000000'
                    msg: ''
                    data:
                      orderId: M1000245001F4
                      orderNo: '3023022014149638'
                      sign: >-
                        LmhUnkw5j0pMiimsG6rKwdNNZGvX6GMpSmD1mdHZwq112wuK5BohmdEoqKB/jkMk28o3da4Cxh6Q+tW97+yTCemRrF+dMaHA73rpOeUuujKQl/UcFvJuMhfLBa2tp09L71NzoBqpPD6aXf37mYAz8E1HmERwFPpac5FVxIYanHG8cqmMLJYsVmHTSxWavgWU03ys9UczBePkBiR8sl2FSOhFABB0wAP28lswrV/ABS68IsLKtyd1fyI3GBfSbIK5nDEEnlE+EdElFdLs9taAxJImeVF1x4eT47+bkPJ2qS8z3K8QGzKLF3W+8SiRZGfSwDTsLKH+2Vycvy5auRl+ag==
                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
      deprecated: false
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.