Axispay 接口文档
商户对接参考 · 代收 / 代付 / 查单 / 余额查询 · 中文版
请求方式:POST JSON
签名算法:MD5
编码:UTF-8
支持国家:BD
概述
Axispay 对外接口统一采用 POST 提交 JSON。业务参数放在 transdata 对象中,
签名 sign 与签名类型 signtype 放在外层。响应同样为 JSON。
外层结构
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
signtype | String | 是 | 签名类型,固定 MD5 |
sign | String | 是 | 签名串(大写) |
transdata | Object | 是 | 业务参数对象 |
JSON请求报文结构
{
"signtype": "MD5",
"sign": "72550F03C5DA4BD6666666666F75",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666",
"order_no": "33333333333",
"order_amount": "470",
"pay_type": "bkash",
"notify_url": "https://merchant.example.com/notify"
}
}接入准备
- 联系客服获取 API 域名、商户号 merchant_code 与 MD5 密钥。
- 回调地址
notify_url需公网可访问,收到通知后必须返回字符串success,否则系统将重试通知。 - 金额均为整数(不带小数,单位元,各国主币单位),孟加拉为塔卡(BDT)。
- 所有接口路径拼接在 API 域名之后,例如
https://{API域名}/pay。
接口一览
| 功能 | 方法 | 路径 | 适用 |
|---|---|---|---|
| 代收下单 | POST | /pay | BD |
| 代收查单 | POST | /queryPayOrder | BD |
| 补单 | POST | /updateOrder | BD |
| 钱包账号校验 | POST | /checkWalletAccount | BD |
| 代付下单 | POST | /v2/withdraw | BD |
| 代付查单 | POST | /v2/queryWithdrawOrder | BD |
| 余额查询 | POST | /v2/queryBalance | BD |
| 代收回调 | POST | 商户 notify_url | BD |
| 代付回调 | POST | 商户 notify_url | BD |
签名规则
系统使用 MD5 签名,密钥获取路径:登录商户后台 → 右上角头像 →「个人中心」→「商户信息」标签页 → secret key 一行点击 Show MD5 Key → 输入谷歌验证码即可显示明文密钥(子商户无权限)。
签名步骤
- 将
transdata中所有非空字段按 ASCII 码升序排序; - 以
key=value形式用&连接; - 末尾拼接
&key=${密钥}; - 进行 MD5 加密,并将结果转为大写;
- 将结果放入外层
sign字段,signtype=MD5。
验签参数应动态获取:即获取所有请求/返回参数进行验签,而非固定文档列出的字段。验签规则不变,参与验签的字段可能随版本变化。
待签名串示例
TEXT按 ASCII 升序,& 连接,末尾拼 key
merchant_code=test1111¬ify_url=1&order_amount=50&order_no=541445444144414&order_time=20201102081725&pay_type=india-upi&product_code=test001&product_name=ttt001&return_url=1&user_no=51070173&key=dsfkgjslgfkslfda
对上述字符串做 MD5 并转大写,即为 sign。
签名工具类(Java)
JAVAMd5Utils
public class Md5Utils {
/** 将 transdata 按 ASCII 升序拼接(跳过空值与 sign),末尾拼 key 后 MD5 转大写 */
public static String sign(JSONObject object, String secretKey) {
String waitSignStr = sortByASCll(object) + "&key=" + secretKey;
return hash(waitSignStr).toUpperCase();
}
public static String sortByASCll(JSONObject object) {
String[] keys = object.keySet().toArray(new String[0]);
Arrays.sort(keys);
StringBuilder sb = new StringBuilder();
for (String key : keys) {
if ("sign".equals(key)) continue;
Object v = object.get(key);
if (v != null && !StringUtils.isBlank(v.toString())) {
sb.append(key).append("=").append(v).append("&");
}
}
sb.deleteCharAt(sb.length() - 1);
return sb.toString();
}
}国家编码
| 国家 | 编码 country_code | 货币类型 |
|---|---|---|
| 孟加拉 | BD | BDT |
订单状态
代收订单状态 order_status
| 状态值 | 描述 |
|---|---|
paying | 支付中 |
success | 成功 |
failed | 下单失败 |
代付订单状态 order_status
| 状态值 | 描述 |
|---|---|
payouting | 代付中 |
success | 出款成功 |
failed | 出款失败 |
🇧🇩孟加拉 (BD)
重要:代收回调根据玩家实际付款金额回调,请做好相应处理(结算以回调/查单返回的
order_amount 为准)。POST代收下单
POST/pay创建一笔代收订单
请求参数(transdata)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 国家编码,固定 BD |
order_no | String | 是 | 商户订单号,需唯一 |
order_amount | String | 是 | 订单金额(整数,不带小数;单位:元,即塔卡(BDT)) |
pay_type | String | 是 | 支付类型,见下表 |
notify_url | String | 是 | 异步回调地址 |
return_url | String | 否 | 支付成功后跳转地址 |
支付类型 pay_type
| 值 | 描述 |
|---|---|
bkash | bkash agent 钱包 |
nagad | nagad agent 钱包 |
bkash-native | 原生 bkash |
nagad-native | 原生 nagad |
upay-native | 原生 upay |
bkash-merchant | bkash merchant 钱包 |
bkash-send-money | bkash 个户 |
nagad-send-money | nagad 个户 |
请求示例
POST/pay · Request
{
"signtype": "MD5",
"sign": "16D87A1823FEF736009CC956FE876834",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666",
"order_no": "20261009000001",
"order_amount": "470",
"pay_type": "bkash",
"notify_url": "https://merchant.example.com/notify",
"return_url": "https://merchant.example.com/return"
}
}响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | String | 响应码,0 成功,其它失败 |
message | String | 响应信息 |
status | Boolean | true 成功 / false 失败 |
order_no | String | 商户订单号 |
plat_order_no | String | 平台订单号 |
merchant_code | String | 商户号 |
country_code | String | 国家代码 |
pay_type | String | 通道类型 |
order_amount | String | 订单金额 |
mc_order_change_fee | String | 商户订单费率手续费 |
mc_order_single_fee | String | 商户订单单笔手续费 |
pay_url | String | 支付链接(收银台) |
成功响应示例
200/pay · Response
{
"code": "0",
"message": "success",
"status": true,
"order_no": "20261009000001",
"plat_order_no": "C25188004564564562",
"merchant_code": "M2512166666666666",
"country_code": "BD",
"pay_type": "bkash",
"order_amount": "470",
"mc_order_change_fee": "6.580000",
"mc_order_single_fee": "0.000000",
"pay_url": "https://cashier.axispay.com/pay/9f3a1c7e/bkash"
}失败响应示例
200/pay · Response
{
"code": "500",
"message": "pay_type not supported",
"status": false
}POST代收查单
POST/queryPayOrder查询代收订单状态
请求参数(transdata)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 固定 BD |
order_no | String | 是 | 商户订单号 |
请求示例
POST/queryPayOrder · Request
{
"signtype": "MD5",
"sign": "1B3C9378F53CE47A54325F8F2E506130",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666",
"order_no": "20261009000001"
}
}响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code / message / status | String / Boolean | 响应码 / 信息 / 状态 |
order_no / plat_order_no | String | 商户订单号 / 平台订单号 |
merchant_code / country_code / pay_type | String | 商户号 / 国家 / 通道类型 |
order_amount | String | 实际支付金额(最终结算金额) |
origin_order_amount | String | 订单初始金额 |
mc_order_change_fee / mc_order_single_fee | String | 费率手续费 / 单笔手续费 |
order_status | String | 订单状态,见 「订单状态」 |
sign | String | 签名 |
txn_id | String | 交易凭证 |
响应示例
200/queryPayOrder · Response
{
"code": "0",
"message": "success",
"status": true,
"order_no": "20261009000001",
"plat_order_no": "C25188004564564562",
"merchant_code": "M2512166666666666",
"country_code": "BD",
"pay_type": "bkash",
"order_amount": "470.000000",
"origin_order_amount": "470.000000",
"mc_order_change_fee": "6.580000",
"mc_order_single_fee": "0.000000",
"order_status": "success",
"txn_id": "TXN2026100900001",
"sign": "7F3A9C21B84D5E6F0A1B2C3D4E5F6071"
}POST代收回调
POST商户 notify_url系统以 POST JSON 通知支付结果
回调 transdata 中的字段从该对象获取;验签规则与下单一致。收到后必须返回字符串 success。
| 字段 | 类型 | 说明 |
|---|---|---|
code | Integer | 响应码:0 成功,其它失败 |
message | String | 响应信息,默认 success |
status | Boolean | 请求状态,默认 true |
order_no | String | 商户订单号 |
plat_order_no | String | 平台订单号 |
merchant_code | String | 商户号 |
country_code | String | 国家编码 |
pay_type | String | 通道类型 |
order_amount | String | 实际支付金额(最终结算金额) |
origin_order_amount | String | 订单初始金额 |
mc_order_change_fee | String | 商户订单浮动手续费 |
mc_order_single_fee | String | 商户订单单笔手续费 |
order_status | String | 订单状态,见 「订单状态」 |
txn_id | String | 交易凭证 |
回调示例
POSTnotify_url · Callback
{
"sign": "169071F3858ECF55AE7EC4DEE30BCD4A",
"transdata": {
"code": 0,
"message": "success",
"status": true,
"order_no": "11134534535945",
"plat_order_no": "C25188004564564562",
"merchant_code": "M250396456456456",
"country_code": "BD",
"pay_type": "bkash",
"order_amount": "1500.000000",
"origin_order_amount": "1500.000000",
"mc_order_change_fee": "21.000000",
"mc_order_single_fee": "0.000000",
"order_status": "success",
"txn_id": "TXN2026100900001"
}
}响应字符串:
successPOST补单
POST/updateOrder代收订单补单(提交凭证)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 固定 BD |
order_no | String | 是 | 商户订单号 |
txn_id | String | 是 | 交易凭证 |
language | String | 否 | 语言,控制返回信息,默认中文 |
为防止资损,补单成功后需等待回调,不要自行更改订单状态。
响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | Integer | 响应码,0 成功,其它失败 |
message | String | 响应信息 |
status | Boolean | 请求状态 |
order_no | String | 商户订单号 |
plat_order_no | String | 平台订单号 |
merchant_code | String | 商户号 |
country_code | String | 国家编码 |
order_amount | String | 订单金额 |
origin_order_amount | String | 订单初始金额 |
order_status | String | 订单状态,见 「订单状态」 |
失败响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | Integer | 错误码,非 0 表示失败 |
msg | String | 失败原因 |
data | Object | 数据体,失败时为 null |
请求示例
POST/updateOrder · Request
{
"signtype": "MD5",
"sign": "883F5FD2631227449B0F5E62695B2E7A",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666",
"order_no": "20261009000001",
"txn_id": "TXN2026100900001",
"language": "zh"
}
}响应示例
200/updateOrder · 成功
{
"code": 0,
"country_code": "BD",
"merchant_code": "M2512166666666666",
"message": "订单已成功",
"order_amount": "470.00",
"order_no": "20261009000001",
"order_status": "success",
"origin_order_amount": "470.00",
"plat_order_no": "C2524749924564983809",
"status": true
}200/updateOrder · 失败
{
"code": 500,
"msg": "交易ID已经被使用,请核实!!!",
"data": null
}POST钱包账号校验
POST/checkWalletAccount校验孟加拉钱包手机号是否属于本平台
请求参数(transdata)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 国家编码,固定 BD |
phone | String | 是 | 待校验的钱包手机号(钱包账号) |
wallet_type | String | 是 | 钱包类型:bkash / nagad / rocket |
外层仍需传
signtype(固定 MD5)与 sign,签名规则与其它接口一致。请求示例
POST/checkWalletAccount · Request
{
"signtype": "MD5",
"sign": "3B7E1C9A54D2F6081E4A9C7B2D5F8031",
"transdata": {
"merchant_code": "M2512166666666666",
"country_code": "BD",
"phone": "01712345678",
"wallet_type": "bkash"
}
}响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | Integer | 响应码,0 表示请求成功(不代表该账号属于本平台) |
message | String | 结果说明,描述该钱包账号是否属于本平台 |
status | Boolean | 校验结果:true 属于本平台 / false 不属于 |
响应示例
200/checkWalletAccount · Response
{
"code": 0,
"message": "01712345678 (bkash) belongs to us",
"status": true
}200/checkWalletAccount · Response(不属于本平台)
{
"code": 0,
"message": "01712345678 (bkash) does not belong to us",
"status": false
}POST代付下单
POST/v2/withdraw发起一笔代付(提现)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 固定 BD |
order_no | String | 是 | 商户订单号,需唯一 |
order_amount | String | 是 | 订单金额(整数,不带小数;单位:元,即塔卡(BDT)) |
pay_type | String | 是 | 代付类型,见下表 |
bank_code | String | 是 | 银行编码(bkash / nagad) |
bank_card_no | String | 是 | 收款手机号(以 0 开头的 11 位号码) |
notify_url | String | 是 | 回调地址 |
bene_name | String | 是 | 收款人姓名 |
test_order | String | 否 | 有值即视为测试订单,系统不自动审核 |
代付类型 / 银行编码
| 值 | 描述 |
|---|---|
bkash | bkash 钱包代付 |
nagad | nagad 钱包代付 |
响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | String | 响应码,0 成功,其它失败 |
message | String | 响应信息 |
status | Boolean | 请求状态,true 成功 / false 失败 |
order_no | String | 商户订单号 |
plat_order_no | String | 平台订单号 |
merchant_code | String | 商户号 |
country_code | String | 国家编码 |
pay_type | String | 通道类型 |
bank_code | String | 银行/钱包编码 |
order_amount | String | 订单金额 |
mc_order_change_fee | String | 商户订单浮动手续费 |
mc_order_single_fee | String | 商户订单单笔手续费 |
请求示例
POST/v2/withdraw · Request
{
"signtype": "MD5",
"sign": "ED32FD03BF1028ED8172895246502B69",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666",
"order_no": "W20261009000001",
"order_amount": "1000",
"pay_type": "bkash",
"bank_code": "bkash",
"bank_card_no": "01712345678",
"bene_name": "zhangsan",
"notify_url": "https://merchant.example.com/notify"
}
}响应示例
200/v2/withdraw · Response
{
"code": "0",
"message": "success",
"status": true,
"order_no": "W20261009000001",
"plat_order_no": "H2518800312530018523",
"merchant_code": "M2512166666666666",
"country_code": "BD",
"pay_type": "bkash",
"bank_code": "bkash",
"order_amount": "1000",
"mc_order_change_fee": "40.00",
"mc_order_single_fee": "6.00"
}⚠ 重要提醒(防止资损):代付下单失败(超时或非明确失败)都应先通过查询订单接口确认实际状态:查不到或状态为失败,才能继续派发给其他通道。
POST代付查单
POST/v2/queryWithdrawOrder查询代付订单状态
请求参数(transdata)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 固定 BD |
order_no | String | 是 | 商户订单号 |
请求 / 响应示例
POST/v2/queryWithdrawOrder · Request
{
"signtype": "MD5",
"sign": "7AD06A8F89BAE4F602DA90B3F51369B1",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666",
"order_no": "W20261009000001"
}
}响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | String | 响应码,0 成功,其它失败 |
message | String | 响应信息 |
status | Boolean | 请求状态 |
order_no | String | 商户订单号 |
plat_order_no | String | 平台订单号 |
merchant_code | String | 商户号 |
country_code | String | 国家编码 |
pay_type | String | 通道类型 |
bank_code | String | 银行/通道编码 |
order_amount | String | 订单金额 |
mc_order_change_fee | String | 商户订单浮动手续费 |
mc_order_single_fee | String | 商户订单单笔手续费 |
order_status | String | 订单状态,见 「订单状态」 |
txn_id | String | 交易凭证 |
sign | String | 签名 |
200/v2/queryWithdrawOrder · Response
{
"code": "0",
"message": "success",
"status": true,
"order_no": "W20261009000001",
"plat_order_no": "H2518800312530018523",
"merchant_code": "M2512166666666666",
"country_code": "BD",
"pay_type": "bkash",
"bank_code": "bkash",
"order_amount": "1000.000000",
"mc_order_change_fee": "40.00",
"mc_order_single_fee": "6.00",
"order_status": "success",
"txn_id": "PTXN2026100900001",
"sign": "A1B2C3D4E5F60718293A4B5C6D7E8F90"
}POST余额查询
POST/v2/queryBalance查询账户余额
请求参数(transdata)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
merchant_code | String | 是 | 商户号 |
country_code | String | 是 | 固定 BD |
请求 / 响应示例
POST/v2/queryBalance · Request
{
"signtype": "MD5",
"sign": "96CAB8A72F673C84905DF12C8E2113A1",
"transdata": {
"country_code": "BD",
"merchant_code": "M2512166666666666"
}
}响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
code | String | 响应码,0 成功,其它失败 |
message | String | 响应信息 |
status | Boolean | 请求状态 |
<国家编码>(如 BD) | Object | 该国余额对象,包含以下字段 |
balance | String | 总余额 |
canPayoutBalance | String | 可代付余额 |
payoutingAmount | String | 代付中金额 |
freezeAmount | String | 冻结金额 |
currency | String | 币种 |
200/v2/queryBalance · Response
{
"code": "0",
"message": "success",
"status": true,
"BD": {
"balance": "6000000",
"canPayoutBalance": "70",
"payoutingAmount": "10000",
"freezeAmount": "400",
"currency": "BDT"
}
}余额字段:国家代码.balance 总余额、.canPayoutBalance 可代付余额、.payoutingAmount 代付中、.freezeAmount 冻结、.currency 币种。
POST代付回调
POST商户 notify_url代付出款结果通知
| 字段 | 类型 | 说明 |
|---|---|---|
code | Integer | 响应码:0 成功,其它失败 |
message | String | 响应信息,默认 success;失败时可能为失败原因 |
status | Boolean | 请求状态,默认 true |
order_no | String | 商户订单号 |
plat_order_no | String | 平台订单号 |
merchant_code | String | 商户号 |
country_code | String | 国家编码 |
pay_type | String | 通道类型 |
bank_code | String | 银行/通道编码 |
order_amount | String | 出款金额 |
mc_order_change_fee | String | 商户订单浮动手续费 |
mc_order_single_fee | String | 商户订单单笔手续费 |
txn_id | String | 交易凭证 |
order_status | String | 订单状态,见 「订单状态」 |
代付回调在出款成功或失败时推送,
order_status 为 success 或 failed;失败时 message 可能为 failed 或失败原因,请以 order_status 作为最终结果判断依据。回调示例
POSTnotify_url · Callback
{
"sign": "FBA18DCC461E20C4C3AD16BC809B7271",
"transdata": {
"code": 0,
"message": "success",
"status": true,
"order_no": "W57745865534534533",
"plat_order_no": "H2518800312530018523",
"merchant_code": "M24972552183546456",
"country_code": "BD",
"pay_type": "bengalCommon",
"bank_code": "bkash",
"order_amount": "1000.000000",
"mc_order_change_fee": "40.00",
"mc_order_single_fee": "6.00",
"txn_id": "PTXN2026100900001",
"order_status": "success"
}
}响应字符串:
success