tags: GLO UA IN

UA_GLO商户对接文档 - 印度(1.02)

change log

接入流程

API说明

签名步骤

  1. 将所有非空值(null)请求参数按照名称字符ASCII升序排列,轉換為{key}={value}字串並以&拼接,最後将密钥作为最后一个参数,参数名为key
  2. 若参数值的数据类型为dict,则按照其中参数名称字符ASCII升序排列(不需排除null),再转为JSON字串作为value

示例:

{
    "p1": {
        "c": 3,
        "a": 1,
        "b": null
    }
}

字符串

p1={"a":1,"b":null,"c":3}
  1. 将待签名字符串进行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&timestamp=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://<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 字符串大写,参考签名步骤

银行卡提現请求参数(非必填参数值可不传)

名称 含义 类型 是否必填 备注
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&timestamp=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": "处理成功"
}

注意

回调参数

名称 含义 类型 备注
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&timestamp=1650343502&key=9ce23be4-a31b-498f-b951-ad7e771c3d73
9CD29D2F819C747268B6500BAB5358AF

获取当前提现区间

API请求方式

接口地址

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&timestamp=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://<HOST>/api/withdraw/withdraw_type/detail/

注意

请求参数(非必填参数值可不传)

名称 含义 类型 是否必填 备注
mch_id 商户ID integer YES
timestamp 时间戳 integer YES 请求时生成
sign 签名 string YES 字符串大写,参考签名步骤
{
    "mch_id": 1,
    "timestamp": 1650343839,
    "sign": "E351CA51F588B3D8C0676A5B6B06F394"
}
mch_id=1&timestamp=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://<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&timestamp=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

银行编码列表

银行名称 代码
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格式不正确