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

# 加纳支付接口

> 加纳支付接口文档，涵盖代收API、代收申请、代收查询、代付API、代付申请、代付查询。

> [!WARNING]
>
> **阅读该接口文档前，务必先查看 [接口说明](https://doc.haipay.net/zh/history/V20260801/get-started/api-conventions.md)。**

## **限额**

| 币种 | 代收 | 代付 |
| :- | :- | :- |
| GHS | 10 - 100,000 | 10 - 100,000 |

## **代收API**

> [!TIP]
>
> 代收授权可采用 OTP、STK Prompt 或重定向流程。

### **代收申请**

**简要描述：**

* 创建代收订单

**URL：`/ghs/collect/apply`**

**参数：**

| 参数名 | 必填 | 类型 | 说明 |
| :- | :-: | :- | :- |
| appId | 是 | Integer | 业务 ID，必须与 URL 币种匹配 |
| orderId | 是 | String | 商户唯一订单号，最多 48 个字符 |
| amount | 是 | String | GHS 金额，最多 2 位小数 |
| payType | 是 | String | `EWALLET` |
| inBankCode | 否 | String | `AIRTEL`、`MTN` 或 `VODAFONE`，以后台启用情况为准 |
| name | 否 | String | 付款人姓名 |
| phone | 是 | String | 12 位数字，以 `233` 开头且不带 `+` |
| email | 否 | String | 有效的付款人邮箱 |
| callBackUrl | 是 | String | 支付成功跳转 URL |
| callBackFailUrl | 是 | String | 支付失败跳转 URL |
| notifyUrl | 否 | String | 异步通知 URL |
| subject | 否 | String | 交易标题、商品名称或付款原因 |
| body | 否 | String | 详细备注 |
| partnerUserId | 否 | String | 唯一用户标识，最多 64 个允许字符 |
| sign | 是 | String | 签名 |

#####

request

```json theme={null}
{
  "appId": 1054,
  "orderId": "GHSCOLLECT001",
  "amount": "100.00",
  "payType": "EWALLET",
  "inBankCode": "MTN",
  "phone": "233241234567",
  "callBackUrl": "https://shop.merchant.com/payment/success",
  "notifyUrl": "https://api.merchant.com/webhooks/haipay",
  "sign": "signature"
}
```

response

```json theme={null}
{
  "status": "1",
  "error": "",
  "msg": "success",
  "data": {
    "orderId": "GHSCOLLECT001",
    "orderNo": "6023071013539074",
    "amount": "100.00",
    "exchangeRate": "1",
    "orderAmount": "100.00",
    "payUrl": "https://pay.haipay.asia/cashier/1L9zQS2",
    "description": "Complete the Mobile Money authorization",
    "expiryPeriod": 15,
    "sign": "signature"
  }
}
```

返回data参数说明

| 参数名 | 类型 | 说明 |
| :- | :- | :- |
| orderId | String | 商户订单号 |
| orderNo | String | 平台订单号 |
| amount | String | 交易金额 |
| exchangeRate | String | 汇率 |
| orderAmount | String | 订单金额 |
| payUrl | String | 支付地址 |
| description | String | 交易描述 |
| expiryPeriod | Integer | 支付有效期剩余分钟数 |
| sign | String | 签名 |

### **代收查询**

**简要描述：**

* 查询代收订单

**URL：`/ghs/collect/query`**

**参数：**

| 参数名 | 必填 | 类型 | 说明 |
| :- | :-: | :- | :- |
| appId | 是 | Integer | 业务 ID |
| orderId | 是 | String | 商户订单号 |
| orderNo | 否 | String | 平台订单号 |
| sign | 是 | String | 签名 |

#####

request

```json theme={null}
{
  "appId": 1054,
  "orderId": "GHSCOLLECT001",
  "orderNo": "6023071013539074",
  "sign": "signature"
}
```

response

```json theme={null}
{
  "status": "1",
  "error": "",
  "msg": "success",
  "data": {
    "orderId": "GHSCOLLECT001",
    "orderNo": "6023071013539074",
    "amount": "100.00",
    "actualAmount": "100.00",
    "fee": "1.00",
    "status": 2,
    "payTime": "2026-08-01 12:30:00",
    "errorMsg": "",
    "inBankCode": "MTN",
    "currency": "GHS",
    "originalCurrency": "GHS",
    "floatExchangeRate": "1",
    "originalAmount": "100.00",
    "certificateId": "",
    "sign": "signature"
  }
}
```

返回data参数说明

| 参数名 | 类型 | 说明 |
| :- | :- | :- |
| orderId | String | 商户订单号 |
| orderNo | String | 平台订单号 |
| amount | String | 交易金额 |
| actualAmount | String | 实际收到金额 |
| fee | String | 手续费 |
| status | Integer | 订单状态 |
| payTime | String | 成功时间，当地时间，格式 `yyyy-MM-dd HH:mm:ss` |
| errorMsg | String | 错误信息 |
| inBankCode | String | 收款银行编码 |
| currency | String | 币种 |
| originalCurrency | String | 原币种 |
| floatExchangeRate | String | 浮动汇率 |
| originalAmount | String | 原金额 |
| certificateId | String | 支付凭证 ID |
| sign | String | 签名 |

### **支付方式**

| 币种 | 支付类型（payType） | 支付编码（inBankCode） | 限额 | 状态 | 描述 |
| :- | :- | :- | :- | :- | :- |
| GHS | EWALLET | AIRTEL | 10 - 100,000 | 可用 | AIRTEL |
| GHS | EWALLET | MTN | 10 - 100,000 | 可用 | MTN |
| GHS | EWALLET | VODAFONE | 10 - 100,000 | 可用 | VODAFONE |

## **代付API**

### **代付申请**

**简要描述：**

* 创建代付订单

**URL：`/ghs/pay/apply`**

**参数：**

| 参数名 | 必填 | 类型 | 说明 |
| :- | :-: | :- | :- |
| appId | 是 | Integer | 业务 ID，必须与 URL 币种匹配 |
| orderId | 是 | String | 商户唯一订单号，最多 48 个字符 |
| amount | 是 | String | GHS 金额，最多 2 位小数 |
| accountType | 是 | String | `EWALLET` |
| bankCode | 是 | String | `AIRTEL`、`MTN` 或 `VODAFONE`，以后台启用情况为准 |
| accountNo | 是 | String | Mobile Money 账号：12 位数字，以 `233` 开头且不带 `+` |
| name | 是 | String | 收款人姓名 |
| phone | 是 | String | 收款人手机号 |
| email | 否 | String | 有效的收款人邮箱 |
| notifyUrl | 否 | String | 异步通知 URL |
| subject | 否 | String | 交易标题、商品名称或付款原因 |
| body | 否 | String | 详细备注 |
| partnerUserId | 否 | String | 唯一用户标识，最多 64 个允许字符 |
| sign | 是 | String | 签名 |

#####

request

```json theme={null}
{
  "appId": 1054,
  "orderId": "GHSPAY001",
  "amount": "100.00",
  "accountType": "EWALLET",
  "bankCode": "MTN",
  "accountNo": "233241234567",
  "name": "Kofi Mensah",
  "phone": "233241234567",
  "notifyUrl": "https://api.merchant.com/webhooks/haipay",
  "sign": "signature"
}
```

response

```json theme={null}
{
  "status": "1",
  "error": "",
  "msg": "success",
  "data": {
    "orderId": "GHSPAY001",
    "orderNo": "3023062014149637",
    "payUrl": "",
    "sign": "signature"
  }
}
```

返回data参数说明

| 参数名 | 类型 | 说明 |
| :- | :- | :- |
| orderId | String | 商户订单号 |
| orderNo | String | 平台订单号 |
| payUrl | String | 付款地址（如适用） |
| sign | String | 签名 |

### **代付查询**

**简要描述：**

* 查询代付订单

**URL：`/ghs/pay/query`**

**参数：**

请求字段与代收查询相同。

#####

request

```json theme={null}
{
  "appId": 1054,
  "orderId": "GHSPAY001",
  "orderNo": "3023062014149637",
  "sign": "signature"
}
```

response

```json theme={null}
{
  "status": "1",
  "error": "",
  "msg": "success",
  "data": {
    "orderId": "GHSPAY001",
    "orderNo": "3023062014149637",
    "amount": "100.00",
    "fee": "1.00",
    "status": 2,
    "payTime": "2026-08-01 12:30:00",
    "errorMsg": "",
    "certificateId": "",
    "sign": "signature"
  }
}
```

返回data参数说明

| 参数名 | 类型 | 说明 |
| :- | :- | :- |
| orderId | String | 商户订单号 |
| orderNo | String | 平台订单号 |
| amount | String | 交易金额 |
| fee | String | 手续费 |
| status | Integer | 订单状态 |
| payTime | String | 成功时间，当地时间，格式 `yyyy-MM-dd HH:mm:ss` |
| errorMsg | String | 错误信息 |
| certificateId | String | 支付凭证 ID |
| sign | String | 签名 |

### **支付方式**

> **移动支付（EWALLET）**
>
> | 币种 | 支付类型（accountType） | 支付编码（bankCode） | 限额 | 状态 | 描述 |
> | :- | :- | :- | :- | :- | :- |
> | GHS | EWALLET | AIRTEL | 10 - 100,000 | 可用 | AIRTEL |
> | GHS | EWALLET | MTN | 10 - 100,000 | 可用 | MTN |
> | GHS | EWALLET | VODAFONE | 10 - 100,000 | 可用 | VODAFONE |

## 相关主题

* [公共接口](https://doc.haipay.net/docs/zh/api/version2/CommonApi.md)
* [HaiPay 接口说明与公共规则](https://doc.haipay.net/zh/history/V20260801/get-started/api-conventions.md)
* [全球收银台支付接口](https://doc.haipay.net/zh/history/V20260801/payments/cashier.md)
* [加纳 — 加纳塞地代收申请 (POST /ghs/collect/apply)](https://doc.haipay.net/zh/history/V20260801/api-reference/ghs/collect-apply.md)
* [加纳 — 加纳塞地代收查询 (POST /ghs/collect/query)](https://doc.haipay.net/zh/history/V20260801/api-reference/ghs/collect-query.md)
* [加纳 — 加纳塞地代付申请 (POST /ghs/pay/apply)](https://doc.haipay.net/zh/history/V20260801/api-reference/ghs/pay-apply.md)
* [加纳 — 加纳塞地代付查询 (POST /ghs/pay/query)](https://doc.haipay.net/zh/history/V20260801/api-reference/ghs/pay-query.md)
* [处理异步通知并验证签名](https://doc.haipay.net/zh/history/V20260801/operations/callback.md)
* [端到端测试：修改订单状态与发送通知](https://doc.haipay.net/zh/history/V20260801/testing/end-to-end.md)
* [查询代收支付类型与编码 (payType)](https://doc.haipay.net/zh/history/V20260801/resources/cashin-code-list.md)
* [查询代付账户类型与银行编码](https://doc.haipay.net/zh/history/V20260801/resources/cashout-code-list.md)
* [HaiPay 本地支付产品页](https://www.haipay.net/products/local-payment)


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