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

> [!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)


## OpenAPI

````yaml docs/zh/api-reference/ngn/ngn.openapi.json POST /ngn/pay/query
openapi: 3.0.1
info:
  title: 尼日利亚奈拉 API
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试环境
security: []
paths:
  /ngn/pay/query:
    post:
      summary: 尼日利亚奈拉代付查询
      requestBody:
        $ref: '#/components/requestBodies/QueryRequest'
      responses:
        '200':
          $ref: '#/components/responses/PayQueryResponse'
components:
  requestBodies:
    QueryRequest:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              appId:
                type: integer
                format: int64
                description: 业务ID
              orderId:
                type: string
                description: 商户订单号
              orderNo:
                type: string
                description: 平台订单号（可选）
              sign:
                type: string
                description: 签名
            required:
              - appId
              - orderId
              - sign
            additionalProperties: false
          example:
            appId: 1054
            orderId: NGNORDER001
            orderNo: '6023071013539074'
            sign: signature
  responses:
    PayQueryResponse:
      description: 成功
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayQueryEnvelope'
          examples:
            success:
              summary: 成功
              value:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: NGNPAY001
                  orderNo: '3023062014149637'
                  amount: '25000.00'
                  fee: '250.00'
                  status: 2
                  payTime: '2026-08-01 12:30:00'
                  errorMsg: ''
                  certificateId: ''
                  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:
    PayQueryEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/PayQueryData'
    EnvelopeBase:
      type: object
      properties:
        status:
          type: string
          description: 接口状态：1正常，0异常
        error:
          type: string
          description: 错误码
        msg:
          type: string
          description: 提示信息
    PayQueryData:
      type: object
      properties:
        orderId:
          type: string
        orderNo:
          type: string
        amount:
          type: string
        fee:
          type: string
        status:
          type: integer
          description: 0未开始，1放款中，2放款成功（终态），3放款失败（终态），-1异常待确认
        payTime:
          type: string
          description: 成功时间，尼日利亚当地时间，格式 yyyy-MM-dd HH:mm:ss
        errorMsg:
          type: string
        certificateId:
          type: string
        sign:
          type: string

````

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