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

# 巴西 — 代收申请

> 巴西 — 代收申请（POST /brl/collect/apply）：appId需使用巴西雷亚尔对应的，用户支付成功后增加巴西雷亚尔余额；关键请求参数含 orderId、name、phone、email。

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

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

## 相关主题

* [巴西支付接口](https://doc.haipay.net/zh/payments/local/brazil.md)
* [HaiPay API 文档简介](https://doc.haipay.net/zh/api-reference/overview.md)
* [HaiPay 配置与签名指南](https://doc.haipay.net/zh/get-started/configuration-and-signatures.md)
* [巴西 — 代收查询 (POST /brl/collect/query)](https://doc.haipay.net/zh/api-reference/brl/collect-query.md)
* [处理异步通知并验证签名](https://doc.haipay.net/zh/operations/callback.md)
* [查阅接口响应结构与错误码](https://doc.haipay.net/zh/resources/error-responses.md)
* [查询代收支付类型与编码 (payType)](https://doc.haipay.net/zh/resources/cashin-code-list.md)


## OpenAPI

````yaml docs/zh/V20260701/api-reference/brl/brl.openapi.json POST /brl/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:
  /brl/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: 交易金额(单位：巴西雷纳尔，精确到小数点后两位；禁止添加标点符号，例如：","） 范围:1-99999
                  pattern: ^(?:[1-9]\d{0,4}|0)(?:\.\d{2})$
                payType:
                  type: string
                  description: 支付方式类型
                inBankCode:
                  type: string
                  description: 支付方式编码
                inBankNo:
                  type: string
                  description: CPF（仅限11位数字）
                  pattern: ^\d{11}$
                  minLength: 11
                  maxLength: 11
                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:
              appId: 1054
              orderId: M233323000059
              amount: '250.00'
              phone: '11987654321'
              email: joao.silva@gmail.com
              name: João Silva Santos
              inBankCode: PIX
              payType: QR
              partnerUserId: '149597870'
              sign: >-
                af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
        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: 返回的是还款地址 其他时候返回的是指引或者详情
                      bankCode:
                        type: string
                        description: 支付方式编码(VA)
                      bankNo:
                        type: string
                        description: 还款卡号（VA）
                      qrCode:
                        type: string
                        description: 二维码内容-可自行生成二维码(QR)
                      sign:
                        type: string
                        description: 签名
                    additionalProperties: false
                additionalProperties: false
              examples:
                success:
                  summary: 成功
                  value:
                    status: '1'
                    error: '00000000'
                    msg: ''
                    data:
                      orderId: M233323000059
                      orderNo: '6023071013539074'
                      payUrl: https://pay.haipay.asia/cashier/1L9zQS2
                      bankCode: PIX
                      bankNo: PC0007I10000035
                      qrCode: >-
                        00020101021228760011ph.ppmi.p2m0111OPDVPHM1XXX0315777148000000017041652948137245442930503001520460165303608540810000.php
                        Of
                        Mandalu62310010ph.allbank05062110000803***88310012ph.ppmi.qrph0111OPDVPHM1XXX63042763
                      sign: >-
                        YEoA8Y2JzQFGVzwJSqmemm1Kfv/bfyIfCqv2dp7RNzT5B72AQvdD+nt2nR4sL1HWscvmNHyVt5ovAi7MMhy3ziih/sMph+wPx4YjH3W1h5DyBvSlWvaKfKrK5ViomZ0pPYWydwRHnnRnicxToHK9S6qtSy7Q73O0hdz4hJ9p41Th3ycBl2Q9SeqSZYSY1ohcPDhdyRf2y0prb8rHgpBKzxZ5BKX/1bsE9OmsSEHAEYT8OGgko6aNe8XPAhr4G48cpWTftvnGQuzh0O65nuZRI/PF+Axt2zJCVbFHDDSREI9NlAT82ebDqhlVdxQzKE67D1nxgjb3dPmDUYHOBpmwxQ==
                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.