# 印度尼西亚支付API文档

# 关于回调:必读

1.收到支付成功回调后,订单金额以实际支付订单金额(orderActualAmount)为准。

2.重复回调:确认回调响应代码是否为{"code":200,"success":true}

3.IP加白操作:在客户端开发者中心 -> API KEY中的白名单输入框进行加白。

4.AccessKey无效:需将创建的AccessKey发送给技术客服进行二次加白。

5.IP受限:确认所有服务器IP和回调IP是否已完成加白。

# 1.如何获取API Key

  用户登录收银台 -> 开发者中心 -> API Key -> 创建API key。API Key 都有单独的配置页,并绑定固定的 IP 地址(“0.0.0.0”表示不做 IP 拦截过滤,任何IP都可以访问),可配置不同的 API Key 满足不同的需求。请不要泄露您的 Access Key 及 Secret Key,以免造成资产损失。Secret Key 生成后将无法再次查看,请注意及时保存,如您忘记了 Secret Key,请在商户后台回收该密钥对并申请新的密钥对。

# 1.1如何创建API KEY

• 点击开发者中心-API Key

• 1选择是否开启调试模式 ( 开启调试模式后,你有任何错误会有规范的提示信息和日志查看地址 )

• 2选择API Key权限

• 3输入白名单地址 (0.0.0.0 表示任意IP地址可以访问)

注:( 输⼊⽩名单域名时应注意多个IP时用","隔离。)

• 4点击创建,可⽣成API KEY

(⽣成API KEY后可以在下⽅我的API KEY列表进⾏复制、查看、编辑和删除等操作,注意Secret key只在生成的时候出现一次,请妥善保存,如您忘记了Secret Key,请回收该密钥对并申请新的密钥对。)

• 点击编辑可关闭或开启【开始调试】及修改API Key权限和白名单地址,修改完成后点击保存即可

注意:创建或编辑API Key之后请耐心等待90秒API Key生效

# 2.如何使用API Key

当前API Key是在请求的Header中添加参数列表

参数名 参数说明 类型 是否必须
access_key Api Key 访问密钥 (如:TPhoa7ZQ) String
timestamp 毫秒级时间戳(13位 如:1679669488472) String
nonce UUID(36位 如:02f7a04f-53cc-47d4-bb3f-fae69dab49ac) 五个部分分别为8个字符、4个字符、4个字符、4个字符、12个字符,中间用“-”号间隔 String
sign 参数签名 (如:GXx2wYUD6UVr+zcmeCSFFPzcBLA=) String

# 3. 技术侧参数接入流程

# 4. 如何接口签名

# 签名说明

  API 请求在通过 internet 传输的过程中极有可能被篡改,为了确保请求未被更改,除公共接口(基础信息,行情数据等)外的私有接口均必须使用您的 API Key 做签名认证,以校验参数或参数值在传输途中是否发生了更改。

一个合法的请求由以下几部分组成:

  • access_key: API 访问密钥;
  • secret_key: 签名加密所使用的密钥(仅在后台申请 API Key 时可见一次,请复制保存在安全处,不可泄露);
  • timestamp: 您发出请求的时间 (UTC 时间) 。如:1632811287325(13位)。在查询请求中包含此值有助于防止第三方截取您的请求;
  • nonce: 随机 UUID 字符串。如:053a1b81-48a0-4bb1-96b2-60f6e509d911(36位);
  • sign: 签名计算得出的值,用于确保签名有效和未被篡改;
  • 所有接口都需要在http请求头 (header) 中传递以上除 secret_key 外的几个公共参数,公共参数包含(access_key ,timestamp,nonce,sign)其他涉及到签名参数以API接口说明为准 。

# 签名步骤

​ 1.定义一个 Map 字典类型对象,将请求中的参数以 key-value 的形式放入其中

​ 2.将 access_key、timestamp、nonce 也放入第一步定义的 Map 中

​ 3.将 Map 里面的属性按照 ASCII 码从小到大做升序排序(字典序)并将 Map 转换输出为“key1=value1&key2=value2” 形式的字符串

​ 4.将上一步转换的字符串用 secret_key 进行 HMAC_SHA1 加密并进行 Base64 转码,得到 sign 参数值。secret_key 是在收银平台创建的 apikey 中的信息

​ 5.将 sign 值和其他所需参数加到请求头 header 中,发送请求目标接口

# 签名调试工具

  • SignUtil: 用户登录收银台 -> 开发者中心 -> API 文档 -> 签名工具 打开签名工具页面 (工具中的access_key请使用有效的access_key 并且请设置允许这个access_key访问的IP白名单为 0.0.0.0,我们强烈推荐使用过的access_key调试完成后废弃)

# 5. 接口列表

# 5.1 测试接口连通性

请求方式

Get

请求URL

/ping

响应数据

{"version":"1.0.1","timestamp":1688116827306}

响应参数说明

Param Type Desc
version String 返回该参数则本文档中所有接口都可正常请求
timestamp int64 Unix时间戳

# 5.2 新建Virtual Accounts类型代收订单

请求方式

Post

请求URL

/api/v3/idn/virtual/createCollectingOrder

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{
    "amount":"10000",
    "channelType":"VIRTUA",
    "externalOrderId":"555555555555555433",
    "notifyUrl":"http://192.168.1.135:30001",
    "returnUrl":"http://192.168.1.135:30001",
    "accountName":"BRI"
}

请求参数说明

Param Desc Sample Require
amount 收款金额,小数点不能超过2位(String) 10000 required
channelType 支付类型(String)oneof=VIRTUA VIRTUA required
externalOrderId 商户订单号 max=64 (String) 555555555555555433 required
accountName 银行名称 oneof =BRI BNI MANDIRI PERMATA BSS BSI CIMB BCA BNC B1 BT M1 RI (String) BRI required
notifyUrl 通知URL(String,URL) http://192.168.1.135:30001 optional
returnUrl 返回地址(String,URL) http://192.168.1.135:30001 optional

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
    "code": "200",
    "success": true,
    "msg": "成功",
    "msgEn": "SUCCESS",
    "data": {
        "cashierUrl": "http://192.168.1.200:1084/OCURRPAID202311010213331698804813742DEV001OO0000000200000877?data=eyJjYXNoaWVyQ3VycmVuY3lBbW91bnQiOjEwMDAwLjAwLCJjYXNoaWVyRXhwaXJlVGltZSI6MTY5\nODgwNjYxMzc1NiwiY2FzaGllcklkIjoiT0NVUlJQQUlEMjAyMzExMDEwMjEzMzMxNjk4ODA0ODEz\nNzQyREVWMDAxT08wMDAwMDAwMjAwMDAwODc3IiwiY2FzaGllclVybCI6Imh0dHA6Ly8xOTIuMTY4\nLjEuMjAwOjEwODQvT0NVUlJQQUlEMjAyMzExMDEwMjEzMzMxNjk4ODA0ODEzNzQyREVWMDAxT08w\nMDAwMDAwMjAwMDAwODc3IiwiY3VycmVuY3kiOiJJRFIiLCJjdXJyZW5jeU9yZGVyVm8iOnsiYW1v\ndW50IjoxM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0RZTkFNSUMifV19XQ==",
        "currency": "IDR",
        "currencyOrderVo": {
            "orderId": "OCURRPAID202311010213331698804813775DEV001OO0000000400000878",
            "externalOrderId": "555555555555555433",
            "currency": "IDR",
            "amount": "10000",
            "tradeNote": "",
            "payTypeName": "Virtual Accounts"
        }
    }
}

响应参数说明

Param Type Desc
cashierUrl String 收银台链接
orderId String 系统订单ID
externalOrderId String 商户订单ID
currency String 币种编码
amount String 收款金额
tradeNote String 备注
payTypeName String 支付类型名称

# 5.3 新建Ewallet类型代收订单

请求方式

Post

请求URL

/api/v3/idn/ewallet/createCollectingOrder

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{
    "amount":"10000",
    "channelType":"EWALLET",
    "externalOrderId":"777777777777777721",
    "notifyUrl":"http://192.168.1.135:30001",
    "returnUrl":"http://192.168.1.135:30001",
    "phone":"628-123456789",
    "accountName":"DANA"
}

请求参数说明

Param Desc Sample Require
amount 收款金额,小数点不能超过2位(String) 10000 required
channelType 支付类型(String)oneof=EWALLET EWALLET required
externalOrderId 商户订单号 max=64 (String) 777777777777777721 required
accountName 银行名称 oneof =OVO DANA LINKAJA SHOPEEPAY(String) DANA required
accountNo 钱包帐户 银行名称是OVO时该字段必填字段(字符串) 1231231 optional
phone Phone(String)OVO需要字段电话号码,应以628或08开头 628123456789 optional
notifyUrl 通知URL(String,URL) http://192.168.1.135:30001 optional
returnUrl 返回地址(String,URL) http://192.168.1.135:30001 optional

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
    "code": "200",
    "success": true,
    "msg": "成功",
    "msgEn": "SUCCESS",
    "data": {
        "cashierUrl": "http://192.168.1.200:1084/OCURRPAID202311010213541698804834841DEV001OO0000000200000880?data=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ndCJTJGdmpkWGxWSHhxUVIyRWNHOEglMkZVaVNUV0lQU0RSeE5QNUdEcWlFajBJT0djeEFjN2d5\nQnZpMURGdHgwRGUwY3dJOWhMUSUzRCUzRCZmb3JjZVRvSDU9ZmFsc2UiLCJ0cmFkZU5vdGUiOiIi\nfSwiaXNDcmVhdGVPcmRlciI6dHJ1ZSwibWVyY2hhbnRJZCI6MTcwNzI4NTg0MDMyNjEyNzYxNywi\ncGF5VHlwZSI6MTA2LCJ1c2VySW5mb05vIjoiREFOQSIsInZlcnNpb24iOiJ2MSJ9&pm=W3siY3VycmVuY3lUeXBlIjoiTVhOIiwicGF5VHlwZXMiOlt7ImNvZGUiOjEwMiwidmFsdWUiOiJC\nQU5LIn1dfSx7ImN1cnJlbmN5VHlwZSI6Ik5HTiIsInBheVR5cGVzIjpbeyJjb2RlIjoxMDIsInZh\nbHVlIjoiQkFOSyJ9XX0seyJjdXJyZW5jeVR5cGUiOiJJRFIiLCJwYXlUeXBlcyI6W3siY29kZSI6\nMTAyLCJ2YWx1ZSI6IkJBTksifV19LHsiY3VycmVuY3lUeXBlIjoiSU5SIiwicGF5VHlwZXMiOlt7\nImNvZGUiOjEwMiwidmFsdWUiOiJCQU5LIn1dfSx7ImN1cnJlbmN5VHlwZSI6IkJSTCIsInBheVR5\ncGVzIjpbeyJjb2RlIjoxMDEsInZhbHVlIjoiUElYIn0seyJjb2RlIjoxMDMsInZhbHVlIjoiUElY\nX0RZTkFNSUMifV19XQ==",
        "currency": "IDR",
        "currencyOrderVo": {
            "orderId": "OCURRPAID202311010213541698804834889DEV001OO0000000400000881",
            "externalOrderId": "777777777777777721",
            "currency": "IDR",
            "amount": "10000",
            "tradeNote": "",
            "payTypeName": "EWallet"
        }
    }
}

响应参数说明

Param Type Desc
cashierUrl String 收银台链接
orderId String 系统订单ID
externalOrderId String 商户订单ID
currency String 币种编码
amount String 收款金额
tradeNote String 备注
payTypeName String 支付类型名称

# 5.4 新建Qris类型代收订单

请求方式

Post

请求URL

/api/v3/idn/qris/createCollectingOrder

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{
    "amount":"10000",
    "channelType":"QRIS",
    "externalOrderId":"1231233123223122313312",
    "notifyUrl":"http://192.168.1.135:30001",
    "returnUrl":"http://192.168.1.135:30001"
}

请求参数说明

Param Desc Sample Require
amount 收款金额,小数点不能超过2位(String) 10000 required
channelType 支付类型(String)oneof=QRIS QRIS required
externalOrderId 商户订单号 max=64 (String) 1231233123223122313312 required
notifyUrl 通知URL(String,URL) http://192.168.1.135:30001 optional
returnUrl 返回地址(String,URL) http://192.168.1.135:30001 optional

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
    "code": "200",
    "success": true,
    "msg": "成功",
    "msgEn": "SUCCESS",
    "data": {
        "cashierUrl": "http://192.168.1.200:1084/OCURRPAID202311010250241698807024604DEV001OO0000000200000891?data=eyJjYXNoaWVyQ3VycmVuY3lBbW91bnQiOjEwMDAwLjAwLCJjYXNoaWVyRXhwaXJlVGltZSI6MTY5\nODgwODgyNDYxNCwiY2FzaGllcklkIjoiT0NVUlJQQUlEMjAyMzExMDEwMjUwMjQxNjk4ODA3MDI0\nNjA0REVWMDAxT08wMDAwMDAwMjAwMDAwODkxIiwiY2FzaGllclVybCI6Imh0dHA6Ly8xOTIuMTY4\nLjEuMjAwOjEwODQvT0NVUlJQQUlEMjAyMzExMDEwMjUwMjQxNjk4ODA3MDI0NjA0REVWMDAxT08w\nMDAwMDAwMjAwMDAwODkxIiwiY3VycmVuY3kiOiJJRFIiLCJjdXJyZW5jeU9yZGVyVm8iOnsiYW1v\ndW50IjoxMDAwMC4wMCwiY3VycmVuY3kiOiJJRFIiLCJleHRlcm5hbE9yZGVySWQ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N1cnJlbmN5VHlwZSI6Ik5HTiIsInBheVR5cGVzIjpbeyJjb2RlIjoxMDIsInZh\nbHVlIjoiQkFOSyJ9XX0seyJjdXJyZW5jeVR5cGUiOiJJRFIiLCJwYXlUeXBlcyI6W3siY29kZSI6\nMTAyLCJ2YWx1ZSI6IkJBTksifV19LHsiY3VycmVuY3lUeXBlIjoiSU5SIiwicGF5VHlwZXMiOlt7\nImNvZGUiOjEwMiwidmFsdWUiOiJCQU5LIn1dfSx7ImN1cnJlbmN5VHlwZSI6IkJSTCIsInBheVR5\ncGVzIjpbeyJjb2RlIjoxMDEsInZhbHVlIjoiUElYIn0seyJjb2RlIjoxMDMsInZhbHVlIjoiUElY\nX0RZTkFNSUMifV19XQ==",
        "currency": "IDR",
        "currencyOrderVo": {
            "orderId": "OCURRPAID202311010250241698807024630DEV001OO0000000400000892",
            "externalOrderId": "1231233123223122313312",
            "currency": "IDR",
            "amount": "10000",
            "tradeNote": "",
            "payTypeName": "QRIS"
        }
    }
}

响应参数说明

Param Type Desc
cashierUrl String 收银台链接
orderId String 系统订单ID
externalOrderId String 商户订单ID
currency String 币种编码
amount String 收款金额
tradeNote String 备注
payTypeName String 支付类型名称

# 5.5 新建代付订单

请求方式

Post

请求URL

/api/v3/idn/createTransferOrder

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{
	"currencyAmount": "40.20",
	"channelType": "IDR",
	"externalOrderId": "826169739606698345",
	"accountId": "13178968534",
	"bankName": "AndhraBank",
	"accountType": "BANK",
	"accountName": "Yonatan",
	"notifyUrl": "http://192.168.1.135:30001",
	"remark": "123"
}

请求参数说明

Param Desc Sample Require
currencyAmount 代付金额 小数不能大于2位(String) 40.20 required
channelType 支付类型 oneof= BANK WALLET(String) BANK required
externalOrderId 商户订单号 max=64(String) 687279463984441035 required
accountId 银行账号(String) 13178968584 required
bankName 银行名字(String) YesBank 根据实际情况 required
accountType 银行账号类型 oneof=IDR(String) IDR required
accountName 收款人姓名(String) Yonatan 根据实际情况 required
remark 备注 max=255(String) 123 optional
notifyUrl 通知URL(String) http://192.168.1.135:30001 optional

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
	"code": "200",
	"success": true,
	"msg": "成功",
	"msgEn": "SUCCESS",
	"data": {
		"orderId": "OCURRDRAW202308220659491692687589549DOCK02OO0000000200003653",
		"orderStatus": "Accepted",
		"externalOrderId": "826169739606698345",
		"currencyType": "IDR"
	}
}

响应参数说明

Param Type Desc
orderId String 系统订单ID
orderStatus String 订单状态
externalOrderId String 商户订单id
currencyType String 法币类型

# 5.6 查询代收订单

请求方式

Post

请求URL

/api/v3/idn/query/collectingOrder

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{
	"externalOrderId": "22222222222222221122222222222",
    "orderId": "OCURRPAID202309200913471695201227695DOCK01OO0000000400341979"
}

请求参数说明

Param Desc Require
externalOrderId 商户订单号 max=64(String) required
orderId 系统订单号(String) required

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
    "code": "200",
    "success": true,
    "msg": "成功",
    "msgEn": "SUCCESS",
    "data": [
        {
            "orderId": "OCURRPAID202309200913471695201227695DOCK01OO0000000400341979",
            "cashierId": "OCURRPAID202309200913461695201226874DOCK01OO0000000200341978",
            "orderType": 1,
            "orderResourceType": 2,
            "userId": "1663371399710216194",
            "orderStatus": 1,
            "orderTime": 1695201228000,
            "channelOrderId": "5a775076-5d82-44f6-b637-c4ad8db934b2",
            "externalOrderId": "22222222222222221122222222222",
            "orderAmount": "10000",
            "orderActualAmount": null,
            "orderFee": null,
            "orderPayTime": null,
            "orderCompleteTime": null,
            "currencyType": "IDR",
            "payType": 102,
            "tradeNote": "wsxtest",
            "notifyUrl": "http://192.168.1.135:8080/abc",
            "markStatus": 0,
            "errorMsg": "",
            "errorMsgEn": "",
            "accountType": "",
            "accountName": "",
            "accountNo": "",
            "orderTypeCode": "Pay",
            "orderResourceTypeCode": "Currency",
            "orderStatusCode": "Wait pay",
            "payTypeCode": "BANK"
        }
    ]
}

响应参数说明

Param Type Desc
accountName String 账户名称
orderActualAmount String 实际订单金额
orderPayTime int64 订单支付时间
orderCompleteTime int64 订单完成时间
errorMsg string 错误消息
errorMsgEn string 错误消息
orderEntryAmount String 订单录入金额
orderFee string 订单费用
accountNo String 账户账号
accountType String 账户类型
cashierId String 收银台ID
channelOrderId String 订单关联渠道订单ID
currencyType String 法币类型 BRL
errorMsg String 错误信息
externalOrderId String 商户订单号
notifyUrl String 回调地址
orderAmount String 订单金额
orderId String 订单id
orderResourceType int64 订单所属业务类型 2-法币订单
orderStatus int64 订单状态 1-待支付
2- 支付成功
orderTime int64 订单创建时间
orderType int64 订单类型 1-收款
2-代付
payType int64 支付类型
102-BANK
tradeNote String 备注
userId String 用户ID
payTypeCode String 支付类型code
orderStatusCode String 订单状态code
orderTypeCode String 订单类型code

# 5.7 查询代付订单

请求方式

Post

请求URL

/api/v3/idn/query/transferOrder

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{
	"externalOrderId": "33333333233",
    "orderId": "OCURRDRAW202309200912251695201145291DOCK02OO0000000200325461"
}

请求参数说明

Param Desc Require
externalOrderId 商户订单号 max=64(String) required
orderId 系统订单号 (String) required

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
    "code": "200",
    "success": true,
    "msg": "成功",
    "msgEn": "SUCCESS",
    "data": [
        {
            "orderId": "OCURRDRAW202309200912251695201145291DOCK02OO0000000200325461",
            "cashierId": "",
            "orderType": 2,
            "orderResourceType": 2,
            "userId": "1663371399710216194",
            "orderStatus": 2,
            "orderTime": 1695201145000,
            "channelOrderId": "",
            "externalOrderId": "33333333233",
            "orderAmount": "1000",
            "orderActualAmount": "1000.1",
            "orderFee": "0.1",
            "orderPayTime": null,
            "currencyType": "IDR",
            "payType": 202,
            "tradeNote": "",
            "notifyUrl": "",
            "markStatus": 0,
            "errorMsg": "The given data failed to pass validation.",
            "errorMsgEn": "The given data failed to pass validation.",
            "accountType": "",
            "accountName": "BCA",
            "accountNo": "0895393712855",
            "orderTypeCode": "Transfer",
            "orderResourceTypeCode": "Currency",
            "orderStatusCode": "In bank processing",
            "payTypeCode": "BANK"
        }
    ]
}

响应参数说明

Param Type Desc
orderId String 订单ID
cashierId String 收银台ID
orderType int64 订单类型
2-代付
orderResourceType int64 订单所属业务类型
2-法币订单
userId String 用户ID
orderStatus int64 订单状态
1-已受理
2-银行处理中
4-失败(银行未受理)
8-成功
16-失败
orderTime int64 订单发起时间
channelOrderId String 订单关联渠道订单ID
externalOrderId String 商户订单号
orderAmount String 订单金额
orderActualAmount String 订单实际金额
orderFee int64 订单手续费
orderPayTime int64 订单支付时间
currencyType String 货币类型
payType int64 支付类型
102:BANK
202:BANK
tradeNote String 备注
notifyUrl String 回调URL
markStatus int64 标记状态
errorMsg String 错误信息
errorMsgEn String 错误信息en
accountType String 账户类型
accountName String 账户名称
accountNo String 账户号
orderTypeCode String 订单类型code
orderResourceTypeCode String 订单所属业务类型code
orderStatusCode String orderStatus描述
payTypeCode String 支付类型code参考payType

# 5.8 查询余额

请求方式

Get

请求URL

/api/v3/idn/query/balance

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
    "code": "200",
    "success": true,
    "msg": "成功",
    "msgEn": "SUCCESS",
    "data": [
        {
            "accountBalance": "97999.8",
            "accountFreezeAmount": "0",
            "accountStatusId": 4,
            "accountWaitSettledAmount": "0",
            "currencyType": "IDR",
            "accountStatus": "InAndOut"
        }
    ]
}

响应参数说明

Param Type Desc
accountBalance String 账户可用余额
accountFreezeAmount String 账户冻结金额
accountStatusId int64 账户状态id
accountWaitSettledAmount String 账户待划转金额
currencyType String 法币类型
accountStatus String 账户状态

# 5.9 查询银行

请求方式

POST

请求URL

/api/v3/idn/query/bank

请求类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

请求头

Param Desc Sample
access_key 商户后台获取 pFqV75X3
timestamp Unix时间戳13位 毫秒 1679724896223
nonce UUID V4 794c26b0-d33c-4394-b2bb-c485eca16d9e
sign 计算出来的签名 kAXyh+eerqrefyaF8dyFB0M4FVo=

请求参数

{"bankName": "Bank BRI"}

如需查询所有银行value则传空字符串,如下数据:

{"bankName": ""}

请求参数说明

Param Desc Require
bankName 银行名称(String) required

响应类型

Header: { 'Content-Type': 'application/json;charset=utf-8'}

响应数据

{
	"code": "200",
	"success": true,
	"msg": "成功",
	"msgEn": "SUCCESS",
	"data": [{
		 "bankName": "Bank BRI",
         "bankCode": "002",
         "currencyType": "IDR",
         "channelBankId": "583",
         "channelId": "1703647674332692481"
	}]
}

响应参数说明

Param Type Desc
bankName String 银行名称
bankCode String 银行code
currencyType String 货币类型
channelBankId String 渠道银行 ID
channelId String 渠道ID

# 5.10 银行列表(银行列表仅供参考,请按查询银行接口返回数据提单)

BankName
Bank BRI
Bank Mandiri
Bank BNI
Bank Danamon
Bank Permata
Bank Permata Syariah
Bank BCA
BII Maybank
Bank Panin
CIMB Niaga
Bank UOB INDONESIA
Bank OCBC NISP
CITIBANK
Bank Windu Kentjana International
Bank ARTHA GRAHA
Bank TOKYO MITSUBISHI UFJ
Bank DBS
Standard Chartered
Bank CAPITAL
ANZ Indonesia
Bank OF CHINA
Bank Bumi Arta
Bank HSBC
Bank Antardaerah
Bank Rabobank
Bank JTRUST INDONESIA
Bank MAYAPADA
Bank Jawa Barat
Bank DKI
Bank BPD DIY
Bank JATENG
Bank Jatim
Bank Jambi
Bank Jambi Syariah
Bank Aceh
Bank Aceh Syariah
Bank SUMUT
Bank NAGARI
Bank Riau
Bank Riau Syariah
Bank SUMSEL BABEL
Bank SUMSEL BABEL Syariah
Bank Lampung
Bank KALSEL
Bank KALBAR
Bank BPD Kaltim
Bank BPD Kalteng
Bank SULSELBAR
Bank Sulut
Bank NTB
Bank NTB Syariah
Bank BPD Bali
Bank NTT
Bank Maluku
Bank BPD Papua
Bank SULTENG
Bank Sultra
Bank BANTEN
Bank Nusantara Parahyangan
Bank Of India Indonesia
Bank Muamalat
Bank Mestika
Bank SHINHAN
Bank Sinarmas
Bank Maspion
Bank Ganesha
Bank ICBC
Bank QNB indonesia
Bank BTN
Bank Woori Saudara
Bank BTPN
Bank Victoria Syariah
Bank Jabar Banten Syariah
Bank Mega
Bank Bukopin
Bank Syariah Indonesia
Bank Jasa Jakarta
Bank KEB HANA
Bank MNC INTERNATIONAL
Bank YUDHA BHAKTI/ Bank Neo Commerce
Bank Rakyat Indonesia AGRONIAGA
Bank SBI Indonesia (Indomonex)
Bank Royal
Bank National Nobu
Bank MEGA SYARIAH
Bank INA
Bank PANIN SYARIAH
PRIMA MASTER BANK
Bank SYARIAH BUKOPIN
Bank Sahabat Sampoerna
Bank DINAR
Bank Seabank Indonesia
Bank BCA SYARIAH
Bank ARTOS/ Bank Jago
Bank BTPN SYARIAH
Bank MULTIARTA SENTOSA
Bank Mayora
Bank INDEX
CNB
Bank MANTAP
Bank VICTORIA INTL
HARDA
BPR KS
IBK
Bank CTBC Indonesia
Bank COMMONWEALTH
Dana
Gopay
LinkAja
OVO
ShopeePay
Bank BCA
Bank BRI
BANK MANDIRI
BANK BNI 46
BANK CIMB NIAGA
BANK PERMATA
Bank BJB
BANK DANAMON INDONESIA
Bank BTN
BANK MAYBANK INDONESIA
BANK SINARMAS
BANK PANIN
BANK BNI SYARIAH
BANK SYARIAH MANDIRI
BPD DKI JAKARTA
BANK MEGA
BSI (Bank Syariah Indonesia)
Bank BTPN
BANK BRI SYARIAH
BANK MUAMALAT INDONESIA
BANK OCBC NISP
wallt OVO(WLLT)
wallt SHOPEEPAY(WLLT)
wallt DANA(WLLT)
wallt GOPAY(WLLT)

# 6. 回调信息

# 6.1 如何回调接口验签

# 验签说明

​ API 请求在通过 internet 传输的过程中极有可能被篡改,为了确保回调未被更改, 您可设置回调参数签名认证。设置方法为:登录收银台 ->开发者中心 -> 回调地址 -> 添加。

# 验签步骤

整体流程和签名大体一致,仅仅是拿来验签的数据取法不一样,签名是自己构造数据,验签是获取数据(header、json)

  1. 取出 header 中的 sign 值;

  2. 定义一个 Map 字典类型对象,将请求中的json参数以 key-value 的形式放入其中

  3. 取出 header 中的 access_key、timestamp、nonce 也放入上一步定义的 Map 中

  4. 将 Map 中的 key 按照 ASCII 码从小到大排序(字典序)并将 Map 转换输出为“key1=value1&key2=value2” 形式的字符串;

  5. 将上一步转换的字符串用 secret_key 进行 HMAC_SHA1 加密并进行 Base64 转码,得到 sign 签名值与第一步 header 中取出的 sign 进行字符串校验,相符则验签通过,反之则验签失败。此处的 secret_key 需与下单时的 access_key 相匹配。

# 6.2 支付回调

回调数据

{
	"currencyType": "IDR",
	"orderAmount": "10000.2",
	"orderTime": 1692687588000,
	"payType": 102,
	"orderId": "OCURRPAID202308220659471692687587691DOCK02OO0000000400003652",
	"orderStatusCode": 1,
	"orderStatus": "Wait pay",
	"markStatus": 0,
	"payParam": "https://rarpay.test.rarpay.com/index/pay/mchtestpage/tp/dd/ordernum/230822170261LXvDYM",
	"externalOrderId": "716134866255702461",
	"tradeNote": "123",
	"payTypeName": "BANK"
}

回调数据说明

Param Type Desc
currencyType String 法币类型
orderAmount float64 订单创建金额
orderTime int64 订单创建时间
payType int64 支付类型
orderId String 订单ID
orderStatusCode int64 订单状态 code
1-待支付
2- 支付成功
orderStatus String orderStatusCode描述
markStatus String 标记状态
payParam String 支付类型
externalOrderId String 商户订单ID
tradeNote String 备注
payTypeName String 支付类型名
errorMsg String 错误信息
errorMsgEn String 错误信息en

任意时候商户都可登录商户后台进行手动触发回调(不建议订单非终态发起手动回调),回调信息中订单状态等相关信息为真实实际状态(手动 回调请一定注意订单状态,如果手动回调订单的状态不是终态,在订单变为终态的时候平台依然会发起通知,请注意业务层面的冗余处理)

# 6.3 代付回调

回调数据

{
    "currencyType": "IDR",
    "accountCode": "BRI",
    "accountName": "Bank BRI",
    "orderId": "OCURRDRAW202410191632291729355549579EDEG2OOO0000000224580757",
    "orderFee": "50",
    "orderStatus": "Completed",
    "errorMsgEn": "complate",
    "externalOrderId": "20241020003228610sk4ESXPk872c554",
    "errorMsg": "complate",
    "payTypeName": "BANK",
    "orderAmount": "10000",
    "orderTime": 1729355550000,
    "payType": 202,
    "userInfoName": "KSTB",
    "accountNo": "2210097174",
    "orderStatusCode": 8,
    "markStatus": 0,
    "orderPayTime": 1729355701000
}

回调数据说明

Param Type Desc
currencyType String 货币类型
accountCode String 银行代码
orderPayTime int 订单支付时间
userInfoNo String 用户证件信息
accountName String 账户名
orderId String 订单ID
orderFee String 订单手续费
orderStatus String orderStatusCode描述
externalOrderId int64 商户订单ID
tradeNote String 备注
payTypeName float64 支付类型名称
orderAmount float64 订单创建金额
orderTime int64 订单创建时间
payType int64 代付类型
accountNo String 备注
orderStatusCode int64 订单状态code
1-已受理
2-银行处理中
4-失败(银行未受理)
8-成功
16-失败
markStatus String 用户证件类型
errorMsg String 错误信息
errorMsgEn String 错误信息en

任意时候商户都可登录商户后台进行手动触发回调(不建议订单非终态发起手动回调),回调信息中订单状态等相关信息为真实实际状态(手动 回调请一定注意订单状态,如果手动回调订单的状态不是终态,在订单变为终态的时候平台依然会发起通知,请注意业务层面的冗余处理)

# 6.4 回调响应

备注:所有的回调都包含签名信息,建议商户做回调验签,商户收到回调信息后,确定订单终态,请响应网

关如下信息(content-type: application/json)如果没有正常响应服务端会在30分钟内,间隔三分钟总计2

次通知

{"code":200,"success":true}

# 6.5 回调通知URL

登录商户后台可以配置统一回调地址(订单中手动指定回调UR地址,优先级高于统一配置的回调地址,例如:订单中指定了notifyUrl参数,不管是否有统一配置回调通知地址,都使用订单中的notifyUrl地址)

注意 http响应status_code优先级最高 只要收到响应status_code=200 响应数据则忽略

# 7. 公共响应代码

filed Type Default value and comment
code String 成功"200" 其他请参考失败code
success Bool 成功 true 失败false 和code保持意义上的同步
msg String 一级code返回的文字性描述
data Object 参考接口列表章节

# 8. 失败code

Code Desc
200 正常
300 参数异常
301 IP无权限
307 签名错误
500 系统错误