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/
UPI提現请求参数(非必填参数值可不传)
名称 |
含义 |
类型 |
是否必填 |
备注 |
mch_id |
商户ID |
integer |
YES |
|
mch_withdraw_no |
商户订单号 |
string |
YES |
不可重复 |
amount |
订单金额 |
integer |
YES |
单位为分 |
withdraw_type |
提现类型 |
string |
YES |
固定值upi |
withdraw_name |
提现人姓名 |
string |
YES |
提现人姓名 |
withdraw_account |
提现帐号 |
string |
YES |
upi地址 |
user_id |
用户ID |
string |
YES |
|
device_type |
设备类型 |
string |
YES |
|
device_ip |
设备IP |
string |
YES |
|
device_id |
设备ID |
string |
YES |
|
address |
用戶地址 |
string |
NO |
部分通道需要,验证KYC |
phone |
用户手机号 |
string |
NO |
部分通道需要,验证KYC。验证开头国码+91 |
email |
用户信箱 |
string |
NO |
部分通道需要,验证KYC。验证字串中有@ |
timestamp |
下单时间戳 |
integer |
YES |
下单时生成 |
sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
银行卡提現请求参数(非必填参数值可不传)
- 蓝色字体的参数为bankcard相较于upi新增的参数
名称 |
含义 |
类型 |
是否必填 |
备注 |
mch_id |
商户ID |
integer |
YES |
|
mch_withdraw_no |
商户订单号 |
string |
YES |
不可重复 |
amount |
订单金额 |
integer |
YES |
单位为分 |
withdraw_type |
提现类型 |
string |
YES |
固定值bankcard |
withdraw_name |
提现人姓名 |
string |
YES |
提现人姓名 |
withdraw_account |
提现帐号 |
string |
YES |
银行卡号 |
withdraw_bank_code |
银行编码 |
string |
YES |
IFSC前四码 |
withdraw_branch |
分行编码 |
string |
YES |
IFSC后六码 |
user_id |
用户ID |
string |
YES |
|
device_type |
设备类型 |
string |
YES |
例如:ios |
device_ip |
设备IP |
string |
YES |
|
device_id |
设备ID |
string |
YES |
|
address |
用戶地址 |
string |
NO |
部分通道需要,验证KYC |
phone |
用户手机号 |
string |
NO |
部分通道需要,验证KYC。验证开头国码+91 |
email |
用户信箱 |
string |
NO |
部分通道需要,验证KYC。验证字串中有@ |
timestamp |
下单时间戳 |
integer |
YES |
下单时生成 |
sign |
签名 |
string |
YES |
字符串大写,参考签名步骤 |
{
"mch_id": 1,
"mch_withdraw_no": "1234567890",
"amount": 41700,
"withdraw_type": "bankcard",
"withdraw_name": "Raj Lal Vasani",
"withdraw_account": "168168168168168168",
"withdraw_bank_code": "ABPB",
"withdraw_branch": "000001",
"user_id": "1002026573",
"device_type": "ios",
"device_ip": "127.0.0.1",
"device_id": "EC:51:BC:97:FF:19",
"timestamp": 1657012221,
"sign": "2DA53A8AB8D0C1CDB6A92C48D486C1DA"
}
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=1657012221&user_id=1002026573&withdraw_account=168168168168168168&withdraw_bank_code=ABPB&withdraw_branch=000001&withdraw_name=Raj Lal Vasani&withdraw_type=bankcard&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
2DA53A8AB8D0C1CDB6A92C48D486C1DA
下单返回参数
名称 |
含义 |
类型 |
备注 |
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": "upi",
"min_amount": 3000000,
"max_amount": 500000000
},
{
"withdraw_type": "bankcard",
"min_amount": 3000000,
"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": "upi",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"withdraw_type": "bankcard",
"sub_withdraw_types": [
{
"sub_withdraw_type": "ABPB",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"sub_withdraw_type": "AIRP",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"sub_withdraw_type": "ALLA",
"default": {
"quota": [],
"min_amount": 30000000,
"max_amount": 500000000
}
},
{
"sub_withdraw_type": "OTHERS",
"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,参考银行编码列表 |
UPI |
upi |
NO |
银行编码列表
- 代码为IFSC前四码
- 若用户输入的代码不存在于以下列表,其适用金额区间的子类代码为
OTHERS
- 承上,下单时不需要转换代码为
OTHERS
,保持原始值即可
- 列表若更新,会提前通知商户
银行名称 |
代码 |
Abhyudaya Cooperative Bank |
ABHY |
Aditya Birla Idea Payments Bank |
ABPB |
Airtel Payments Bank |
AIRP |
Allahabad Bank |
ALLA |
Andhra Bank |
ANDB |
Andhra Pragathi Grameena Bank |
APGB |
The AP Mahesh Cooperative Urban Bank |
APMC |
APNA Sahakari Bank |
ASBL |
Au Small Finance Bank |
AUBL |
Bassein Catholic Cooperative Bank |
BACB |
Bank Of Baroda |
BARB |
Bandhan Bank |
BDBL |
Dena Bank |
BKDN |
Bank of India |
BKID |
BNP Paribas |
BNPA |
Central Bank Of India |
CBIN |
City Union Bank |
CIUB |
Capital Small Finance Bank |
CLBL |
Canara Bank |
CNRB |
Corporation Bank |
CORP |
Cosmos Cooperative Bank |
COSB |
Catholic Syrian Bank |
CSBK |
Development Credit Bank |
DCBL |
Dombivli Nagari Sahakari Bank |
DNSB |
Equitas Small Finance Bank |
ESFB |
ESAF Small Finance Bank |
ESMF |
Federal Bank |
FDRL |
Fino Payments Bank |
FINO |
Fincare Small Finance Bank |
FSFB |
Greater Bombay Cooperative Bank |
GBCB |
HDFC Bank |
HDFC |
IDBI Bank |
IBKL |
ICICI Bank |
ICIC |
IDFC Bank |
IDFB |
Indian Bank |
IDIB |
IndusInd Bank |
INDB |
Indian Overseas Bank |
IOBA |
India Post Payment Bank |
IPOS |
Jammu and Kashmir Bank |
JAKA |
Janaseva Sahakari Bank |
JANA |
Janata Sahakari Bank |
JSBP |
Karnataka Bank |
KARB |
Kalupur Commercial Cooperative Bank |
KCCB |
Kalyan Janata Sahakari Bank |
KJSB |
Kotak Mahindra Bank |
KKBK |
Kerala Gramin Bank |
KLGB |
Karur Vysya Bank |
KVBL |
Karnataka Vikas Grameena Bank |
KVGB |
Lakshmi Vilas Bank |
LAVB |
Bank Of Maharashtra |
MAHB |
Maharashtra Gramin Bank |
MAHG |
Mehsana Urban Cooperative Bank |
MSNU |
North East Small Finance Bank |
NESF |
NKGSB Cooperative Bank |
NKGS |
The Nainital Bank |
NTBL |
Oriental Bank of Commerce |
ORBC |
GP Parsik Bank |
PJSB |
Pragathi Krishna Gramin Bank |
PKGB |
Punjab and Maharashtra Cooperative Bank |
PMCB |
Punjab And Sind Bank |
PSIB |
Punjab National Bank |
PUNB |
PAYTM Payments Bank |
PYTM |
RBL Bank |
RATN |
Reserve Bank Of India |
RBIS |
State Bank of India |
SBIN |
Standard Chartered Bank |
SCBL |
Surat District Cooperative bank |
SDCB |
South Indian Bank |
SIBL |
Small Industries Development Bank Of India |
SIDB |
Suryoday Small Finance Bank |
SURY |
Syndicate Bank |
SYNB |
Tamilnad Mercantile Bank |
TMBL |
Union Bank of India |
UBIN |
UCO Bank |
UCBA |
Ujjivan Small Finance Bank |
UJVN |
United Bank Of India |
UTBI |
Axis Bank |
UTIB |
Utkarsh Small Finance Bank |
UTKS |
Yes Bank |
YESB |
请求错误状态列表
status |
描述 |
-1 |
内部错误,请联系管理员 |
1 |
参数错误 |
2001 |
商户不存在 |
2004 |
该提现帐号已在黑名单内 |
2012 |
商户订单ip不在白名单中 |
2101 |
商户不支持该提现支付方式 |
2102 |
商户余额不足 |
2105 |
商户提现金额不在允许范围 |
5001 |
暂无可用提现资源 |
5002 |
提现订单不存在 |
5003 |
订单状态冲突 |
5005 |
银行卡提现缺少withdraw_bank_code字段 |
5012 |
银行编码错误 |
5014 |
手机格式不正确,国码或手机长度错误 |
5018 |
银行卡提现缺少withdraw_branch字段 |
5019 |
withdraw_branch格式不正确 |
5021 |
email格式不正确 |
tags:
GLO
UA
IN
UA_GLO商户对接文档 - 印度(1.02)
change log
接入流程
API说明
HTTP
请求的形式0
且msg为OK
,其他情况请参考请求错误状态列表签名步骤
null
)请求参数按照名称字符ASCII升序排列,轉換為{key}={value}
字串並以&
拼接,最後将密钥作为最后一个参数,参数名为key
dict
,则按照其中参数名称字符ASCII升序排列(不需排除null
),再转为JSON字串作为value示例:
字符串
本文档所有示例皆使用以下配置:
商戶ID:
1
密钥:
9ce23be4-a31b-498f-b951-ad7e771c3d73
示例,待签名数据:
代付下单接口
注意
调用代付下单接口时,只有接口明确返回了不成功的状态码才表示下单失败。
其它比如请求超时,服务器错误等非约定场景均不能表示下单失败。
重新下单前请务必通过查询接口判断订单状态。
API请求方式
HTTP
POST
{"Content-Type": "application/json"}
integer
和string
接口地址
UPI提現请求参数(非必填参数值可不传)
integer
string
integer
string
upi
string
string
string
string
string
string
string
string
string
@
integer
string
银行卡提現请求参数(非必填参数值可不传)
integer
string
integer
string
bankcard
string
string
string
string
string
string
ios
string
string
string
string
string
@
integer
string
下单返回参数
integer
0
为成功,其它为失败string
0
时为错误原因string
dict
string
string
string
new
string
null
代付回调
支付结果会以
HTTP
POST
JSON
形式从平台服务器发往贵司提供的回调地址贵司收到通知处理成功后回复
{"status": 0}
回复内容可加上msg以具体描述处理情形(非必填)
示例
注意
callback
的回调(沖正)给商户,商户收到此回调也应将款项退回给用户。回调参数
string
string
string
success
/fail
/callback
string
string
integer
string
获取当前提现区间
API请求方式
HTTP
GET
{"Content-Type": "application/json"}
integer
和string
接口地址
注意
请求参数(非必填参数值可不传)
integer
integer
string
返回参数
integer
0
为成功,其它为失败string
0
时为错误原因string
list(dict)
dict
string
integer
integer
获取当前精准提现区间
API请求方式
HTTP
GET
{"Content-Type": "application/json"}
integer
和string
接口地址
注意
请求参数(非必填参数值可不传)
integer
integer
string
返回参数
integer
0
为成功,其它为失败string
0
时为错误原因string
list(dict)
dict
无子类结构
string
dict
含子类结构
string
list(dict)
string
dict
金额区间
list(integer)
integer
integer
订单查询
API请求方式
HTTP
GET
{"Content-Type": "application/json"}
integer
和string
接口地址
mch_withdraw_no
为商户订单号请求参数(非必填参数值可不传)
integer
integer
string
返回参数
integer
0
为成功,其它为失败string
0
时为错误原因integer
dict
string
string
string
new
/success
/fail
/callback
string
提现类型列表
银行编码列表
OTHERS
OTHERS
,保持原始值即可请求错误状态列表