UA_GLO商户对接文档 - 印尼(1.02)
接入流程
- 获取商户ID(mch_id)、密钥、API域名(HOST)
- 提供贵司下单IP,以开通IP白名单,并提供订单回调地址
- 依照此文档进行api接口对接
API说明
- 接口采用
HTTP请求的形式
- 签名采用MD5杂凑运算
- 所有的金额单位为「分」
- 请求成功时,返回参数中的status固定为
0且msg为OK,其他情况请参考请求错误状态列表
签名步骤
- 将所有非空值(
null)请求参数按照名称字符ASCII升序排列,轉換為{key}={value}字串並以&拼接,最後将密钥作为最后一个参数,参数名为key
- 若参数值的数据类型为
dict,则按照其中参数名称字符ASCII升序排列(不需排除null),再转为JSON字串作为value
示例:
{
"p1": {
"c": 3,
"a": 1,
"b": null
}
}
字符串
p1={"a":1,"b":null,"c":3}
- 将待签名字符串进行MD5杂凑运算并转为大写,得到签名
{
"mch_id": 1,
"mch_withdraw_no": "1234567890",
"amount": 56500,
"withdraw_type": "bankcard",
"withdraw_name": "Ida Bagus Sudjana",
"withdraw_account": "168168168168168168",
"withdraw_bank_code": "BMRI",
"user_id": "1002026573",
"timestamp": 1650276377
}
amount=56500&mch_id=1&mch_withdraw_no=1234567890×tamp=1650276377&user_id=1002026573&withdraw_account=168168168168168168&withdraw_bank_code=BMRI&withdraw_name=Ida Bagus Sudjana&withdraw_type=bankcard&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
D5C222E7BB941A0D13FCB236D53F159B
代付下单接口
注意
调用代付下单接口时,只有接口明确返回了不成功的状态码才表示下单失败。
其它比如请求超时,服务器错误等非约定场景均不能表示下单失败。
重新下单前请务必通过查询接口判断订单状态。
API请求方式
HTTP POST
- Header
{"Content-Type": "application/json"}
- body为JSON字符串
- 注意参数的类型,区分
integer和string
接口地址
http://<HOST>/api/withdraw/
电子钱包提現请求参数(非必填参数值可不传)
| 名称 |
含义 |
类型 |
是否必填 |
备注 |
| mch_id |
商户ID |
integer |
YES |
|
| mch_withdraw_no |
商户订单号 |
string |
YES |
不可重复 |
| amount |
订单金额 |
integer |
YES |
单位为分 |
| withdraw_type |
提现类型 |
string |
YES |
dana/ovo/gopay |
| withdraw_account |
提现帐号 |
string |
YES |
手机号码,验证开头国码+62 |
| user_id |
用户ID |
string |
YES |
|
| device_type |
设备类型 |
string |
YES |
例如:ios |
| device_ip |
设备IP |
string |
YES |
|
| device_id |
设备ID |
string |
YES |
|
| withdraw_name |
提现人姓名 |
string |
NO |
提现人姓名 |
| timestamp |
下单时间戳 |
integer |
YES |
下单时生成 |
| sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
银行卡提現请求参数(非必填参数值可不传)
- 蓝色字体的参数为bankcard相较于电子钱包新增的参数
| 名称 |
含义 |
类型 |
是否必填 |
备注 |
| mch_id |
商户ID |
integer |
YES |
|
| mch_withdraw_no |
商户订单号 |
string |
YES |
不可重复 |
| amount |
订单金额 |
integer |
YES |
单位为分 |
| withdraw_type |
提现类型 |
string |
YES |
固定值bankcard |
| withdraw_account |
提现帐号 |
string |
YES |
银行卡号 |
| withdraw_bank_code |
银行编码 |
string |
YES |
参考银行编码列表 |
| user_id |
用户ID |
string |
YES |
|
| device_type |
设备类型 |
string |
YES |
例如:ios |
| device_ip |
设备IP |
string |
YES |
|
| device_id |
设备ID |
string |
YES |
|
| withdraw_name |
提现人姓名 |
string |
NO |
提现人姓名 |
| timestamp |
下单时间戳 |
integer |
YES |
下单时生成 |
| sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
{
"mch_id": 1,
"mch_withdraw_no": "1234567890",
"amount": 41700,
"withdraw_type": "bankcard",
"withdraw_account": "168168168168168168",
"withdraw_bank_code": "CENA",
"user_id": "1002026573",
"device_type": "ios",
"device_ip": "127.0.0.1",
"device_id": "EC:51:BC:97:FF:19",
"timestamp": 1659415725,
"sign": "A21865AF49851812CC29D592F39F4B59"
}
amount=41700&device_id=EC:51:BC:97:FF:19&device_ip=127.0.0.1&device_type=ios&mch_id=1&mch_withdraw_no=1234567890×tamp=1659415725&user_id=1002026573&withdraw_account=168168168168168168&withdraw_bank_code=CENA&withdraw_type=bankcard&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
A21865AF49851812CC29D592F39F4B59
下单返回参数
| 名称 |
含义 |
类型 |
备注 |
| status |
接口状态 |
integer |
0为成功,其它为失败 |
| msg |
接口消息 |
string |
接口状态非0时为错误原因 |
| timestamp |
时间戳 |
string |
返回时生成 |
| data |
订单数据 |
dict |
|
| data.order_id |
平台订单号 |
string |
|
| data.mch_withdraw_no |
商户订单号 |
string |
|
| data.status |
订单状态 |
string |
下单成功后固定为new |
| data.remark |
订单备注 |
string |
預設值null |
{
"status": 0,
"msg": "OK",
"timestamp": "2022-04-19 10:39:38",
"data": {
"order_id": "2204191039380826",
"mch_withdraw_no": "1234567890",
"status": "new",
"remark": null
}
}
{
"status": 5001,
"msg": "暂无可用提现资源",
"timestamp": "2022-04-19 10:46:09"
}
代付回调
{
"status": 0,
"msg": "处理成功"
}
- 我司在没有收到贵司成功响应前,会通过一定的策略定期重新发起通知
注意
- 請同时校验商户订单号及订单金额是否正确。
- 建议商户添加回调IP白名单。
- 一个订单可能会多次发送给接入方系统,接入方系统必须能够正确处理重复的通知。
- 已回调成功的订单也有可能会再转为失败,我方会将款项退回给商户,并发起status为
callback的回调(沖正)给商户,商户收到此回调也应将款项退回给用户。
回调参数
| 名称 |
含义 |
类型 |
备注 |
| order_id |
平台订单号 |
string |
|
| mch_withdraw_no |
商户订单号 |
string |
|
| status |
订单状态 |
string |
success/fail/callback |
| merchant_code |
商户代码 |
string |
保留字段 |
| remark |
订单说明 |
string |
|
| timestamp |
时间戳 |
integer |
请求时生成 |
| sign |
签名 |
string |
字符串大写,参考签名步骤 |
{
"order_id": "2204191039380826",
"mch_withdraw_no": "1234567890",
"status": "success",
"remark": null,
"merchant_code": "test",
"timestamp": 1650343502,
"sign": "9CD29D2F819C747268B6500BAB5358AF"
}
mch_withdraw_no=1234567890&merchant_code=test&order_id=2204191039380826&status=success×tamp=1650343502&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
9CD29D2F819C747268B6500BAB5358AF
获取当前提现区间
API请求方式
HTTP GET
- Header
{"Content-Type": "application/json"}
- 注意参数的类型,区分
integer和string
接口地址
http://<HOST>/api/withdraw/withdraw_type/
注意
请求参数(非必填参数值可不传)
| 名称 |
含义 |
类型 |
是否必填 |
备注 |
| mch_id |
商户ID |
integer |
YES |
|
| timestamp |
时间戳 |
integer |
YES |
请求时生成 |
| sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
{
"mch_id": 1,
"timestamp": 1650343839,
"sign": "E351CA51F588B3D8C0676A5B6B06F394"
}
mch_id=1×tamp=1650343839&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
E351CA51F588B3D8C0676A5B6B06F394
返回参数
| 名称 |
含义 |
类型 |
备注 |
| status |
接口状态 |
integer |
0为成功,其它为失败 |
| msg |
接口消息 |
string |
接口状态非0时为错误原因 |
| timestamp |
时间戳 |
string |
返回时生成 |
| data |
可用提现类型数据列表 |
list(dict) |
请求成功时返回 |
| data[i] |
可用提现类型数据 |
dict |
|
| data[i].withdraw_type |
提现类型 |
string |
参考提现类型列表 |
| data[i].min_amount |
单笔下单金额下限 |
integer |
|
| data[i].max_amount |
单笔下单金额上限 |
integer |
|
{
"status": 0,
"msg": "OK",
"timestamp": "2022-04-19 13:23:28",
"data": [
{
"withdraw_type": "ovo",
"min_amount": 30000000,
"max_amount": 500000000
},
{
"withdraw_type": "bankcard",
"min_amount": 30000000,
"max_amount": 500000000
}
]
}
获取当前精准提现区间
API请求方式
HTTP GET
- Header
{"Content-Type": "application/json"}
- 注意参数的类型,区分
integer和string
接口地址
http://<HOST>/api/withdraw/withdraw_type/detail/
注意
- 本接口提供商户精准的提现区间
- 商户应根据此接口返回参数展示可用提现区间给用户
- 根据用户可提供的个人信息,展示给用户的区间也会不同
- 以下图为例,假设用户名及身分证明在下单时皆为选填,若用户不能提供用户名及身分证明,实际可用的提现区间则为default, unidentified, anonymous三者交集

- 接口返回参数说明中若无default之外的金额区间,直接使用default即可
请求参数(非必填参数值可不传)
| 名称 |
含义 |
类型 |
是否必填 |
备注 |
| mch_id |
商户ID |
integer |
YES |
|
| timestamp |
时间戳 |
integer |
YES |
请求时生成 |
| sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
{
"mch_id": 1,
"timestamp": 1650343839,
"sign": "E351CA51F588B3D8C0676A5B6B06F394"
}
mch_id=1×tamp=1650343839&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
E351CA51F588B3D8C0676A5B6B06F394
返回参数
| 名称 |
含义 |
类型 |
备注 |
| status |
接口状态 |
integer |
0为成功,其它为失败 |
| msg |
接口消息 |
string |
接口状态非0时为错误原因 |
| timestamp |
时间戳 |
string |
返回时生成 |
| data |
可用提现类型数据列表 |
list(dict) |
请求成功时返回 |
| data[i] |
可用提现类型数据 |
dict |
根据提现类型是否有子类,分为两种结构;无子类结构,含子类结构 |
无子类结构
| 名称 |
含义 |
类型 |
备注 |
| withdraw_type |
提现类型代码 |
string |
参考提现类型列表 |
| default |
满足所有条件时的金额区间 |
dict |
结构參考金额区间 |
含子类结构
| 名称 |
含义 |
类型 |
备注 |
| withdraw_type |
提现类型代码 |
string |
参考提现类型列表 |
| sub_withdraw_types |
可用子类列表 |
list(dict) |
|
| sub_withdraw_types[j].sub_withdraw_type |
子类代码 |
string |
|
| sub_withdraw_types[j].default |
满足所有条件时的金额区间 |
dict |
结构參考金额区间 |
金额区间
| 名称 |
含义 |
类型 |
备注 |
| quota |
定额额度 |
list(integer) |
|
| min_amount |
单笔下单金额下限 |
integer |
|
| max_amount |
单笔下单金额上限 |
integer |
|
{
"status": 0,
"msg": "OK",
"timestamp": "2022-04-19 13:23:28",
"data": [
{
"withdraw_type": "ovo",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"withdraw_type": "bankcard",
"sub_withdraw_types": [
{
"sub_withdraw_type": "CENA",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"sub_withdraw_type": "BRIN",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"sub_withdraw_type": "BMRI",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
}
]
}
]
}
订单查询
API请求方式
HTTP GET
- Header
{"Content-Type": "application/json"}
- 注意参数的类型,区分
integer和string
接口地址
http://<HOST>/api/withdraw/query/<str:mch_withdraw_no>/
请求参数(非必填参数值可不传)
| 名称 |
含义 |
类型 |
是否必填 |
备注 |
| mch_id |
商户ID |
integer |
YES |
|
| timestamp |
时间戳 |
integer |
YES |
请求时生成 |
| sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
http://<HOST>/api/order/query/2204191039380826/
{
"mch_id": 1,
"timestamp": 1650343839,
"sign": "E351CA51F588B3D8C0676A5B6B06F394"
}
mch_id=1×tamp=1650343839&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
E351CA51F588B3D8C0676A5B6B06F394
返回参数
| 名称 |
含义 |
类型 |
备注 |
| status |
接口状态 |
integer |
0为成功,其它为失败 |
| msg |
接口消息 |
string |
接口状态非0时为错误原因 |
| timestamp |
时间戳 |
integer |
返回时生成 |
| data |
支付类型数据 |
dict |
请求成功时返回 |
| data.order_id |
平台订单号 |
string |
|
| data.mch_withdraw_no |
商户订单号 |
string |
|
| data.status |
订单状态 |
string |
new/success/fail/callback |
| data.remark |
订单说明 |
string |
|
{
"status": 0,
"msg": "OK",
"timestamp": "2022-04-19 13:31:27",
"data": {
"order_id": "2204191039380826",
"mch_withdraw_no": "1234567890",
"status": "fail",
"remark": null
}
}
{
"status": 5002,
"msg": "提现订单不存在",
"timestamp": "2022-04-19 13:38:18"
}
提现类型列表
| 名称 |
代码 |
存在子类型 |
| 银行卡 |
bankcard |
YES,参考银行编码列表 |
| DANA钱包 |
dana |
NO |
| GOPAY钱包 |
gopay |
NO |
| OVO钱包 |
ovo |
NO |
银行编码列表
- 我方编码优先参考SwiftCode前4码,如无SwiftCode则使用其股票代码或者首字母缩写
- 若用户输入的代码不存在于以下列表,其适用金额区间的子类代码为
OTHERS
- 承上,下单时不需要转换代码为
OTHERS,保持原始值即可
- 當前印尼通道都不支持未聲明銀行,實際
OTHERS銀行無法完成提現
- 列表若更新,会提前通知商户
| 银行名称 |
代码 |
| Bank Central Asia |
CENA |
| Bank Rakyat Indonesia |
BRIN |
| Bank Mandiri |
BMRI |
| Bank Negara Indonesia |
BNIN |
| CIMB Niaga |
BNIA |
| Maybank |
IBBK |
| Permata Bank |
BBBA |
| Panin Bank |
PINB |
| Bank Danamon Indonesia |
BDIN |
| Bank BTN |
BTAN |
| BANK UOB INDONESIA |
BBIJ |
| BANK OCBC NISP |
NISP |
| CITIBANK |
CITI |
| BANK ARTHA GRAHA |
ARTG |
| BANK DBS INDONESIA |
DBSB |
| BANK CAPITAL INDONESIA |
BCIA |
| ANZ PANIN BANK |
ANZB |
| BANK BJB |
PDJB |
| BPD DKI JAKARTA |
BDKI |
| BPD JAWA TENGAH |
PDJG |
| BANK JATIM |
PDJT |
| BPD ACEH |
PDAC |
| BPD SUMATERA BARAT/BANK NAGARI |
PDSB |
| BPD LAMPUNG |
PDLP |
| BPD KALIMANTAN BARAT |
PDKB |
| BPD KALIMANTAN TIMUR |
PDKT |
| BPD SULAWESI UTARA |
PDWU |
| BANK NUSANTARA PARAHYANGAN |
NUPA |
| BANK MUAMALAT INDONESIA |
MUAB |
| BANK SINARMAS |
SBJK |
| BANK GANESHA |
GNES |
| Bank BTPN |
TAPE |
| BANK MEGA |
MEGA |
| BANK BUKOPIN |
BBUK |
| BANK SYARIAH INDONESIA |
BSMD |
| BANK HANA |
HNBN |
| BANK NATIONAL NOBU |
NOBU |
| BANK SAHABAT SAMPOERNA |
BDIP |
| BANK KESEJAHTERAAN EKONOMI |
BKEX |
| BANK ARTOS INDONESIA |
BAIX |
| BANK MAYORA |
MAYO |
| BANK COMMONWEALTH |
BICN |
请求错误状态列表
| status |
描述 |
| -1 |
内部错误,请联系管理员 |
| 1 |
参数错误 |
| 2001 |
商户不存在 |
| 2004 |
该提现帐号已在黑名单内 |
| 2012 |
商户订单ip不在白名单中 |
| 2101 |
商户不支持该提现支付方式 |
| 2102 |
商户余额不足 |
| 2105 |
商户提现金额不在允许范围 |
| 5001 |
暂无可用提现资源 |
| 5002 |
提现订单不存在 |
| 5003 |
订单状态冲突 |
| 5005 |
银行卡提现缺少withdraw_bank_code字段 |
| 5012 |
银行编码错误 |
| 5014 |
手机国码错误 |
tags:
GLOUAIDUA_GLO商户对接文档 - 印尼(1.02)
change log
接入流程
API说明
HTTP请求的形式0且msg为OK,其他情况请参考请求错误状态列表签名步骤
null)请求参数按照名称字符ASCII升序排列,轉換為{key}={value}字串並以&拼接,最後将密钥作为最后一个参数,参数名为keydict,则按照其中参数名称字符ASCII升序排列(不需排除null),再转为JSON字串作为value示例:
字符串
本文档所有示例皆使用以下配置:
商戶ID:
1密钥:
9ce23be4-a31b-498f-b951-ad7e771c3d73示例,待签名数据:
代付下单接口
注意
调用代付下单接口时,只有接口明确返回了不成功的状态码才表示下单失败。
其它比如请求超时,服务器错误等非约定场景均不能表示下单失败。
重新下单前请务必通过查询接口判断订单状态。
API请求方式
HTTPPOST{"Content-Type": "application/json"}integer和string接口地址
电子钱包提現请求参数(非必填参数值可不传)
integerstringintegerstringdana/ovo/gopaystring+62stringstringiosstringstringstringintegerstring银行卡提現请求参数(非必填参数值可不传)
integerstringintegerstringbankcardstringstringstringstringiosstringstringstringintegerstring下单返回参数
integer0为成功,其它为失败string0时为错误原因stringdictstringstringstringnewstringnull代付回调
支付结果会以
HTTPPOSTJSON形式从平台服务器发往贵司提供的回调地址贵司收到通知处理成功后回复
{"status": 0}回复内容可加上msg以具体描述处理情形(非必填)
示例
注意
callback的回调(沖正)给商户,商户收到此回调也应将款项退回给用户。回调参数
stringstringstringsuccess/fail/callbackstringstringintegerstring获取当前提现区间
API请求方式
HTTPGET{"Content-Type": "application/json"}integer和string接口地址
注意
请求参数(非必填参数值可不传)
integerintegerstring返回参数
integer0为成功,其它为失败string0时为错误原因stringlist(dict)dictstringintegerinteger获取当前精准提现区间
API请求方式
HTTPGET{"Content-Type": "application/json"}integer和string接口地址
注意
请求参数(非必填参数值可不传)
integerintegerstring返回参数
integer0为成功,其它为失败string0时为错误原因stringlist(dict)dict无子类结构
stringdict含子类结构
stringlist(dict)stringdict金额区间
list(integer)integerinteger订单查询
API请求方式
HTTPGET{"Content-Type": "application/json"}integer和string接口地址
mch_withdraw_no为商户订单号请求参数(非必填参数值可不传)
integerintegerstring返回参数
integer0为成功,其它为失败string0时为错误原因integerdictstringstringstringnew/success/fail/callbackstring提现类型列表
银行编码列表
OTHERSOTHERS,保持原始值即可OTHERS銀行無法完成提現请求错误状态列表