> ## 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 /ngn/pay/apply），请求参数包含 orderId、amount、accountType、bankCode 与签名字段，返回订单状态与交易结果。

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

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

## 相关主题

* [尼日利亚支付接口](https://doc.haipay.net/zh/history/V20260801/payments/local/nigeria.md)
* [HaiPay API 文档简介](https://doc.haipay.net/zh/history/V20260801/api-reference/overview.md)
* [HaiPay 配置与签名指南](https://doc.haipay.net/zh/history/V20260801/get-started/configuration-and-signatures.md)
* [尼日利亚 — 代付查询 (POST /ngn/pay/query)](https://doc.haipay.net/zh/history/V20260801/api-reference/ngn/pay-query.md)
* [处理异步通知并验证签名](https://doc.haipay.net/zh/history/V20260801/operations/callback.md)
* [查询代付账户类型与银行编码](https://doc.haipay.net/zh/history/V20260801/resources/cashout-code-list.md)


## OpenAPI

````yaml docs/zh/api-reference/ngn/ngn.openapi.json POST /ngn/pay/apply
openapi: 3.0.1
info:
  title: 尼日利亚奈拉 API
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试环境
security: []
paths:
  /ngn/pay/apply:
    post:
      summary: 尼日利亚奈拉代付申请
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  format: int64
                  description: 业务ID（后台获取，需与URL币种一致）
                orderId:
                  type: string
                  maxLength: 48
                  description: 商户订单号，必须唯一，最长48个字符
                amount:
                  type: string
                  pattern: ^((([1-9]\d*)(\.\d{1,4})?)|(0\.(?!0+$)\d{1,4}))$
                  description: 交易金额（NGN），最多2位小数；范围以商户后台业务配置范围为准
                accountType:
                  type: string
                  description: 账户类型；须为商户后台配置支持的类型
                bankCode:
                  type: string
                  description: 银行代码；须为商户后台支付编码配置支持的值
                accountNo:
                  type: string
                  pattern: ^\d{10}$
                  description: 收款银行账号，固定10位数字
                name:
                  type: string
                  pattern: ^[A-Za-z ]+$
                  description: 收款人英文姓名，至少包含以空格分隔的名和姓，不支持数字或特殊字符
                phone:
                  type: string
                  description: 收款人手机号
                email:
                  type: string
                  format: email
                  description: 收款人邮箱
                notifyUrl:
                  type: string
                  format: uri
                  description: 异步通知地址
                subject:
                  type: string
                  description: 交易标题、商品名称或支付原因
                body:
                  type: string
                  description: 备注详情
                partnerUserId:
                  type: string
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9\-~!@#$%&*()_]+$
                  description: 用户唯一标识
                sign:
                  type: string
                  description: 签名
              required:
                - appId
                - orderId
                - amount
                - accountType
                - bankCode
                - accountNo
                - name
                - sign
              additionalProperties: false
            example:
              appId: 1054
              orderId: NGNPAY001
              amount: '25000.00'
              accountType: BANK_ACCOUNT
              bankCode: '000013'
              accountNo: '8880737325'
              name: Emeka Okafor
              notifyUrl: https://api.merchant.com/webhooks/haipay
              sign: signature
      responses:
        '200':
          $ref: '#/components/responses/PayApplyResponse'
components:
  responses:
    PayApplyResponse:
      description: 成功
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayApplyEnvelope'
          examples:
            success:
              summary: 成功
              value:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: NGNPAY001
                  orderNo: '3023062014149637'
                  payUrl: ''
                  sign: signature
            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
  schemas:
    PayApplyEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/PayApplyData'
    EnvelopeBase:
      type: object
      properties:
        status:
          type: string
          description: 接口状态：1正常，0异常
        error:
          type: string
          description: 错误码
        msg:
          type: string
          description: 提示信息
    PayApplyData:
      type: object
      properties:
        orderId:
          type: string
        orderNo:
          type: string
        payUrl:
          type: string
          description: 付款地址（如适用）
        sign:
          type: string

````

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