jeepayment Integration Guide

捷付支付接口接入指南

jeepayment Proprietary Notice

Proprietary statement:

  • The information contained in this document is subject to change with the Change Request procedures as specified in the Project Agreement.
  • jeepayment shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
  • Copyright. Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement; contains confidential and proprietary information of jeepayment and/or third parties which is protected by copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available without proper authorization.

Copyright ©2019 jeepayment.

捷付专有声明

  • 本文档中包含的信息可能会根据项目协议中规定的更改请求程序进行更改。
  • 捷付支付不对本文包含的错误或与本材料的提供,执行或使用相关的偶然或必然损失负责。
  • 版权.包括软件,文件格式和视听显示; 可根据适用的软件许可协议使用; 包含受版权法,商业秘密法和国际条约保护的TC游戏和/或第三方的机密和专有信息,未经适当授权,不得提供或以其他方式提供。

Copyright ©2019 捷付支付.


Demo & Downloads

Download JAVA Demo Download PHP Demo Download C# Demo

Table of Contents (目录)

捷付支付提供了这个接口集成文档、软件、咨询服务和与捷付支付产品相关的接口配置,如对文档有疑义、建议,请及时与对接人员联系。

Skype 联系方式 : Add jeepayment Engineer 添加捷付技术

1.1. PROTOCOL 通讯协议

网络通讯是使用HTTP POST 发送请求接口,请求接口成功之后,会以JSON格式返回。

1.2. Request and Response Parameters 请求与回应

  • All requests parameters are key-values in the POST body.
  • All response parameters are in JSON.
  • All parameters are in UTF-8.
  • 所有的请求参数都是以POST方式请求,参数放在key-values里面。
  • 所有回应参数是以JSON 形式返回。
  • 所有的参数型态都是使用 UTF-8 。

Common FORM Request Parameters 共用的请求参数

Parameter Name
参数名称
Description
说明
merchant_code Merchant code give by the jeepayment payment system
商户号,是由捷付支付系统商提供的商户号。
data Encrypted JSON String based on the specific api.
encryptByPaymentSystemPublicKey({bank: 0001,amount: 1})

数据
依照每个API需求的Json 字串, 使用捷付公钥进行加密后之数据
如:encryptByPaymentSystemPublicKey({bank: 0001,amount: 1})
sign SignByMerchantPrivateKey(data)
sign message generated using private key of merchant, this is to ensure that the message was not tampered.

签名档
使用商户私钥生成的签名档(数据) 为了保证数据传输过程中的数据真实性、完整性与安全性,所有的接口请求,都需要对数据进行签名档生成,返回数据也需进行签名档校验。

Common Response Parameters 共用的返回参数

Parameter Name
参数名称
Description
说明
status 1 = success , 0 = failed
1 表示成功,0表示失败
error_code Please refer in the error code list
请参照附件错误代码列表
error_msg Please refer in the error code list
请参照附件错误代码列表
data Encrypted JSON Data return by the system based on specific API, DecryptByMerchantPrivateKey(data)
每个捷付支付系统接口回传相对应的加密 Json 数据,需透过商户私钥解密取得明文(数据)
sign ValidateSignByPaymentSystemPrivateKey(sign), signed generated message by the Payment system needs to validate by the merchant to ensure message was not tampered.
由捷付支付系统产生之签名档,为了保证数据传输过程中的数据真实性、完整性与安全性,所有的接口请求,都需要对数据进行签名档,返回数据也需使用捷付公钥进行签名档校验。

1.3. Request and Response Sample 请求与响应 (使用2.1充值为范例)

步骤一:产生RSA publicKey 及 privateKey 并取得 jeepayment public Key,请参考 附件3.4. RAS Tools 公/密钥小助手

//jeepayment Public Key get in jeepayment BO 
//捷付平台公钥从后台取得
String paymentPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArIbjWokWp/AkpKfhgDoOgQGEXNZvw44ieKDwDnZOCWO/tAqD0qiVUh5cy9PKMZqqwbpb9YNjJSwPSqWs8CzUWJmFknNqz0cKu14NxGKA/ED3U5ujf/0zFJTfLCIAGxpwfV0gZgkKJpxXzWUbnnrrU1r6SAIMjg1Fvww8oo0cl1HUabKIEi7JDNPOdBjXWXSWwyUFtkoWOqWfaVApvmiHn/1wHeV/jnVQcBYPBnvw5w84tJ80+Wg+4xOzCKsOTIMMIRJULLrgt3TZd6uJNNteV1tPxpVai6rOWqrYfq40RQ3Y+SjxaDKNKWsrhHwMAQ1vE+CK+tz9FKWi30xnzDym/wIDAQAB";
//merchant public key generate in jeepayment BO 
//商户公钥从后台产生
String merchantPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtsPgXbV7Xdj9CGwPWIBKgN/ZLk+F4zA513KTkHYSDL3LY+EaQBcq8JEfTKPEffpB3Kt4l+UB8Q5BJl96YorGXAc43aTFcmwP1/yIG+TtsY/jhVR4pZsz/EuCMWLz5yvlmYljRNdbq8yr410qUfGUia/FPwQrC943Ai+ovRqB6ddPiHjGjr4MrvrnqdpTqT17oQqDr01hoQpwqzVsp2oq1KvDIvWvcI/4nm0UttoKgUu3WWitZEdq0b5lCa/nn9xZtl2I1TYiR3z51l/VyldT5f/+M2w+Nw9Ro7k/AuQmT0xWw9H+uhgHKWwOHrwgK2LdR8melhq02A31ylL6vWZqCwIDAQAB";
//merchant private key generate in jeepayment BO 
//商户私钥从后台产生
String merchantPrivateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC2w+BdtXtd2P0IbA9YgEqA39kuT4XjMDnXcpOQdhIMvctj4RpAFyrwkR9Mo8R9+kHcq3iX5QHxDkEmX3piisZcBzjdpMVybA/X/Igb5O2xj+OFVHilmzP8S4IxYvPnK+WZiWNE11urzKvjXSpR8ZSJr8U/BCsL3jcCL6i9GoHp10+IeMaOvgyu+uep2lOpPXuhCoOvTWGhCnCrNWynairUq8Mi9a9wj/iebRS22gqBS7dZaK1kR2rRvmUJr+ef3Fm2XYjVNiJHfPnWX9XKV1Pl//4zbD43D1GjuT8C5CZPTFbD0f66GAcpbA4evCArYt1HyZ6WGrTYDfXKUvq9ZmoLAgMBAAECggEAGI69SRonl3aemVEbxsKGQEbTwdtBnENQolhs545V4oxmFeebRV1XkbeOQxgGQP8tdl879vz4g9Fsg6F0qmUHPjpiM7X+Kd/HSThPeaALKD6zTakKBQaTt6TVu5kWOMu3MCg7xHZDhRQdTJGqLBSP5uhNUqhWuGOFdK++tponNqpS5f61RKff95rdblMn00NM61ALQDH14ssnUhES8YNUJEzqAvq2iPh6w9CvwusKwiM4zsZ13sVf51M9rbjNe81s2JEyiMYvOIcyrOGFki9ZfltCrnqDQauhNAhtQ5M+8vOwMKjVgBuzgtjJcXoIAmP70abRJ+qAz08uAU/HV4BjkQKBgQD7Yl25JqkJqwrPovGNN8Ux2tVrcqtUCgOPCZCTF5n6ardUT9VJAgQzr6Cqh+sAt72CacYvHmESmJRsVDybgDcnVSROEM+9AP2OZADopLz7KLkxVWMKLa4huWM1ryuVSYYrBLzn3dXSDEvas15T/MiJKgGRrGglNKUZ3zC8hWyfdQKBgQC6HvczN6yvxVpKHGejFKRprS2i10GI4ziW8P8dg04E0WrNImlTFGVnMvUCpMO7Ubmci6bG6jtFTobpY7BA4nQMPR2yQAwouomPQpJ8PkldKq2fo+rNd/C2/U0aXNWfUd0alZjkmSCrplUo8jaf7G/v1OkrAlwVI2F+s8nn9OMzfwKBgQCixzZTPxJ0PTpZ63QocnWRa9eIpQ8F8xoM1C+237CIM/QUd0Fv7gtUgKQz6KEmrNPdD6sSNcS76uspHn7EXojYQkyo9D/gbjTBsEXaX1oz9FG+/UCNhbjdA5OXXp+FIr/rOT0tkzrysZ2otz8ceXJNR1MOxioF9Yn3L8v6Nxd4RQKBgBpImzJBb4KXBSwoHL6cAKfny+UOLvQM2oX+XJinXVIy3LlBXcxcugE74fvQls+SN/sSgaffliUwdL7q1A4lrKu5ycLNZqotxZVUmmkvRp8AkupTdKo1gOnmlYfeilBoeCfz7laCBWoYIDibE/m7owckcxUezTAzAeaprx6xp5AzAoGBAIBNumk5s1jGVlmy145+QTspQJLNag6kcwSI2fIkARCdT/j5BWjNbTalKW/aNHO7TASiK+ilIVLLcsAZ2Ft4vjiNQLe4esDIPSE/GUaifVwa015M7HswnkT3u8ANJ0GQtOGjcdFEWthBtN1SrFiG/h1CHbLN6GywnAQanU8hPUgf";

步骤二:组 Json 字串,将所需要传送的参数组成 Json 字串,以充值为范例:

json = {"amount":"10.00","platform":"PC","note":"-","bank_code":"0102","service_type":"1","merchant_user":"火凤凰","merchant_order_no":"1538733292873","risk_level":"1","callback_url":"https://paymentcallback.phoenix.com/callback"}

步骤三:把 Json 字串与捷付公钥进行RSA加密

String data = RSAUtil.encryptByPublicKey(json, paymentPublicKey);
Sysout.out.print(data);

加密结果 加密后的数据格式如下,请留意您将不会得到完全相同的字串。

I6yKyEXCD/XtwJS1uoREl+q7iaorO3PjKpuasMD+q5BcFT1xNcPmosFaO99Hb3HUj7KW/Ve/Z2dnS+Xe0U6aDqaK6ghI7437597DUZgiB1RBaBUeNQZvTIMbC1obtX5lpsfELq34H9V9im1fQgf0eEg7ZSS/U8mc9RkuG57x/4kEfkKw1AFhf/mgX6VBB8dVu+9jDKy++/KykH4f0hic2m4yqPzw1PvBb1oVNolj2iG4DFPU8jd83/JTMerk/jURG0i4zaux3uSjWwCM2A96KLwkWw/B04zsf0wWSTJxG+OyiH6XruWiUElyrzCv81YNWW+ZogTVc+WCUBPIHc7+DwlOljnlWSEODSB6mEO0/sAgCDfTOk8IJnlxethcKMGrW4iEOFcbMgovkvys65S6KZEKQaPHxooq56C6TEUgKDvAl0qiTMwbLyt4+CEtbFaNu8F/CbTrPUc6MzFJQC1uvbg9b6q6/iCSZiZtPw5vOB0o/timSzh6X/rX4LBoSmp+b/+GpfJQZkXbcn4+0XDOUPCm5UQOqeK3pSpA9vwTurnuNAlpLuY4z/Yq8zMpvMP3A7uTQALB0sIul816uUkXwyydkjBkqbnCLCDNeaDBeW08kigcUfLBFrW8rAs1ICNF3tklG1sRkuldNgXCxSz2gVAYdNGmNUlTB0nWwoJle2o=

步骤四:制作签名档,透过刚刚之做出来的 data商户私钥进行签名档生成

String sign = RSAUtil.sign(data, merchantPrivateKey);
System.out.println(sign);

加密结果 生成之签名档格式如下,请留意您将不会得到完全相同的字串。

fj+/vsdgiA0Hg/dtOQUIJSXJ4z2n/EBd3f1rI9bNPGVqkStn9AjgVwaBW2A/zsTjHTW+EPPj8m/LF5UU7njdfNLS3gtNBFv8Cnab/ok8oZV8W91kXaqkajLfyZyTPzBNvL/OAlkoK0mb/abxphNlReyEXPeNxKsdHTd6CUZZ97WzZzJMBoHXRDqytCDoQnT4KpvCKr/fCjJiTX+CaU280pXKOvDQSDyAZ54AaRupYS9hE9tOpp4lfPZpI0Rry2kaJeFt6ymVSY5ePC86Dikatdm2y48Vub3HUHWi0HrVyEoI927n5LV/gtmX2H6U9Or1faZJ6D4O+eMdr55mwAREZg==

步骤五:透过 HTTP POST 传送,参数编码请使用 UTF-8

JeeDepositResponse response = null;
try {
	String param = generatePostParamRequest(data, sign);
	System.out.println(param);
	String json = HttpUtil.httpPost(null, apiUrl, param, "UTF-8", 30000);
	response = JsonUtil.fromJson(json, JeeDepositResponse.class);
} catch (Exception e) {
	throw new RuntimeException(e);
}
/**
 * 串传送字串
 */
private static String generatePostParamRequest(String data, String sign) {
	StringBuilder sb = new StringBuilder();
	try {
		sb.append("merchant_code=").append(URLEncoder.encode(merchantCode, "UTF-8")).append("&");
		sb.append("data=").append(URLEncoder.encode(data, "UTF-8")).append("&");
		sb.append("sign=").append(URLEncoder.encode(sign, "UTF-8"));
	} catch (UnsupportedEncodingException e) {
		System.out.println(e);
	}
	return sb.toString();
}

打印param 結果,这就是传送给捷付支付的资讯。

merchant_code=demouser&data=I6yKyEXCD%2FXtwJS1uoREl%2Bq7iaorO3PjKpuasMD%2Bq5BcFT1xNcPmosFaO99Hb3HUj7KW%2FVe%2FZ2dnS%2BXe0U6aDqaK6ghI7437597DUZgiB1RBaBUeNQZvTIMbC1obtX5lpsfELq34H9V9im1fQgf0eEg7ZSS%2FU8mc9RkuG57x%2F4kEfkKw1AFhf%2FmgX6VBB8dVu%2B9jDKy%2B%2B%2FKykH4f0hic2m4yqPzw1PvBb1oVNolj2iG4DFPU8jd83%2FJTMerk%2FjURG0i4zaux3uSjWwCM2A96KLwkWw%2FB04zsf0wWSTJxG%2BOyiH6XruWiUElyrzCv81YNWW%2BZogTVc%2BWCUBPIHc7%2BDwlOljnlWSEODSB6mEO0%2FsAgCDfTOk8IJnlxethcKMGrW4iEOFcbMgovkvys65S6KZEKQaPHxooq56C6TEUgKDvAl0qiTMwbLyt4%2BCEtbFaNu8F%2FCbTrPUc6MzFJQC1uvbg9b6q6%2FiCSZiZtPw5vOB0o%2FtimSzh6X%2FrX4LBoSmp%2Bb%2F%2BGpfJQZkXbcn4%2B0XDOUPCm5UQOqeK3pSpA9vwTurnuNAlpLuY4z%2FYq8zMpvMP3A7uTQALB0sIul816uUkXwyydkjBkqbnCLCDNeaDBeW08kigcUfLBFrW8rAs1ICNF3tklG1sRkuldNgXCxSz2gVAYdNGmNUlTB0nWwoJle2o%3D&sign=fj%2B%2FvsdgiA0Hg%2FdtOQUIJSXJ4z2n%2FEBd3f1rI9bNPGVqkStn9AjgVwaBW2A%2FzsTjHTW%2BEPPj8m%2FLF5UU7njdfNLS3gtNBFv8Cnab%2Fok8oZV8W91kXaqkajLfyZyTPzBNvL%2FOAlkoK0mb%2FabxphNlReyEXPeNxKsdHTd6CUZZ97WzZzJMBoHXRDqytCDoQnT4KpvCKr%2FfCjJiTX%2BCaU280pXKOvDQSDyAZ54AaRupYS9hE9tOpp4lfPZpI0Rry2kaJeFt6ymVSY5ePC86Dikatdm2y48Vub3HUHWi0HrVyEoI927n5LV%2FgtmX2H6U9Or1faZJ6D4O%2BeMdr55mwAREZg%3D%3D

步骤六:捷付支付响应 (response) 并从响应取出 Json

if (response == null || !response.getstatus().equals("1")) {
	System.out.println("存款请求响应错误=>" + response);
	throw new RuntimeException();
}
System.out.println(response);
					
String decrypted = null;
try {
	decrypted = RSAUtil.decryptByPrivateKey(response.getData(), privateKey);
	System.out.println(decrypted);
} catch (Exception e) {
	System.out.println(e);
}
JeeResponseDataEntity obj = JsonUtil.fromJson(decrypted, JeeResponseDataEntity.class);
System.out.println(obj.getTransactionUrl());

打印response 結果。

{"status":1,"sign":"fu2nDjnbdmxU45qDKaw+Y9bT1+gzaVylsHDP0ivk4B11jl6Cir0v5J7TUvsXXKUqzgeoj2QFNj+p\rDZfCjDfLbtCjT3Kv+12goWr9ImW+u2QGetvpNCxzWvkp0cR4qrs1PLxF+bFPZTaKJmyJIceqy3LG\rb9fgDt4iz0HovDmp8bBqh8MTvzPHwv7crw9QwfQuTW+nfxQGtMfeGLkl1vDhzOzIWzC2kMCpUawY\rITatJzJQQ50Tn7bN3RUwLRCZgZFDz810yZUcb9oCWWaJ7MbNbc/S3ePt4+AjkQyEjQXQCR3ojMYd\rcrGz9H30/XZ0VDyYnezs71uTNnCszEX9xkeGzw==\r","data":"JXqb26w++IncEJ5W8OJFeVTKz+2eJaEbM0uts1XleU6htTQcwpBKTZ5VjiCe2jHf03/Qb9aJYA6s\rcql6UKcMQenbcnSDbkRjT9gYFyYxKnSDq/BCyIiNw1/ChSd2xEwq3c3NNsQhDg9XcwPAoo9npyqA\rytxJsNYy/Q0CuCWVOsVWGJsoFr8cof8HSf2j5w00KOke/09DscSghjCy9ROJluMkSfWDl/L4NN/h\rmItb/9+HisBvhzNhJfZms1GYAzU3oCOQykWQVdxPoqL4Q8ncI7LXbDtiLyZgwOjjj5dQqZNF9ZkN\rlDDbokfPJcDyImZj0Ioc5xceygqSHujeflpFo4ikd0/9vWZpgoBNyHs57d5vZsTLX7PtbJH3A9RS\rkLlYfGTJtIczozZIPhodUAvCq8sHE8qjgx/DSz2XSCEXC2lrpUv/oFVIe8Coa7U3a2N8k1LIldiv\rbvbtVn+cj09AdYQoN56vJ40aNiD1AdAEqS+IpfjTkV6tg29SJE2Uw6+cp08m+amBxRCFFfG6UPK0\r0pzDT6fluhp/7to6dTxSpXdnOkEoO5Te8jC7pXO4Jx28YApa/gdSV6hRuQ67DfNj8b1C3KU13ayQ\rzSY9CqfvvoV5bs6qsEtNn2o7kVTb+3yJp3h+mEYiz/PFWv4sM3q6JwCpTNJxB/rBZTK4ehoS+X+K\rnAUu01C2X9fKZgcWPx3EItKOUhvYvDPRa953mcrLYB41Dj+EKZHLr2Rd6emYQQ3kTfzldwjgUIno\resm4+FX48/m4esb/7TUvI1hRqKo5CwAG+lj7qVzzXiAVvlH+7RInV6QyHgmuyNraw4isj5saM4E0\rvswEBmsxo+BD32A/fOLKYewuUahgpZqWx+joJG6ZT8Tc49Y5XniewlqQzlvJD2XcJtSPNkJtSLIW\r8PxwwSSuPSFhL6sk57IErom12kPgXqZMvLB3qM2tEi2tiRJ7zX6KwNxqbAT1qidTDOG5LD3uifwY\rZXgf0L9iN3+hxgW9ArmHaUJgUi+AS+c+DK25\r","error_code":null,"error_msg":null}

打印decrypted 結果,取出 data 值并使用 merchantPrivateKey 进行 RSA 解密。

{"amount":10,"trans_time":"2018-04-25 20:43:57","qr_image_url":null,"bank_card_num":null,"trans_id":120054975,"email":null,"bank_acct_name":null,"transaction_url":"http://pg2.ouyie.cn/ainong/230001/sender.do?senderKey=67bd1d07-63eb-41fc-b2f4-70fab4b67295","note":"-"}

打印obj.getTransactionUrl() 結果,从解密后的参数取得交易连结。

为了方便贵司使用我司的支付,在 QR 的部份,请先取 qr_image_url,若 qr_image_url 回传是 null 再请取 transaction_url。

http://pg2.ouyie.cn/ainong/230001/sender.do?senderKey=67bd1d07-63eb-41fc-b2f4-70fab4b67295

目前捷付提供了六个接口,充值跟提现,对应的充值与提现回调的接口与查馀额跟查订单状态,充值与提现是由商户方发起而回调是由捷付发起请求的。

2.1. Deposit Request API 充值申请接口

This API is use to request deposit in the system

Service End point : https://api.yoopayment.com/rsa/deposit


此接口用于充值申请

接口地址 : https://api.yoopayment.com/rsa/deposit


Request Parameters 请求参数

Parameter
参数
Data Type
资料型态
Required
必要
Description
说明
bank_code String (16)
字串 (16)
Yes
必填
bank code selected from the channel list api, only service types = Payment Gateway E-bank
required to input, other service types please ignore. 银行代码:目前只有服务类型网关会使用到,其他请放空值。
service_type String (2)
字串 (2)
Yes
必填
Refer to service type table
服务类型:请参考附件 (服务类型列表)
amount String (12)
字串 (12)
Yes
必填
amount to be deposit
金额:此金额为存款金额,以元为单位,可抓取找小数点2位
merchant_user String (64)
字串 (64)
Yes
必填
fill in the real name of the deposit user
商户用户号:填写存款用户真实姓名
risk_level String (8)
字串 (8)
Yes
必填
parameter = '1' is a constant
请带入常数值1
merchant_order_no String (64)
字串 (64)
Yes
必填
reference trans no of merchant for the transaction
(This id must be unique to the merchant, otherwise the request is rejected)
商户自定之订单号
(订单号不可重复否则会被退回)
platform String (8)
字串 (8)
Yes
必填
parameter = 'PC' is a constant
请带入常数值PC
player_ip String (64)
字串 (64)
No
非必填
Player reall IP Address
玩家IP地址
callback_url String (4000)
字串 (4000)
No
非必填
Notifciation / Callback url once succesfull deposit
(If this is blank the one in the Merchant console will be the one to use)
用于存款回调通知的地址
note String (255)
字串 (255)
No
非必填
Remarks
备注
备注:

当传送时需要组下面字串 POST 传送字串。

POST 传送时所需要的参数有 merchant_code 及 data 及 sign 这三个:

merchant_code=JA01Demo&data=(RSA 加密字串)&sign=(RSA 加密字串)

傳送的 data 加密字串詳解:

需要先组成 Json 字串

json = {"amount":"10","platform":"PC","note":"-","bank_code":"0102","service_type":"1","merchant_user":"phoenixtest","merchant_order_no":"1524657963632","risk_level":"1","callback_url":"https://paymentcallback.phoenix.com/callback"}

然后透过组合完成的 Json 字串及 jeepayment 公钥进行 RSA 加密

data = RSAUtil.encryptByPublicKey(json, paymentPublicKey);

透过上述完成的 data 加密字串及 merchant 私钥生成签名档

sign = RSAUtil.sign(data, merchantPrivateKey);

Response Parameters 响应参数

Parameter
参数
Description
说明
bank_card_num Parameter for future enhancement, please ignore for now
保留栏位,预设回传空值
bank_acct_name Parameter for future enhancement, please ignore for now
保留栏位,预设回传空值
email Parameter for future enhancement, please ignore for now
保留栏位,预设回传空值
amount amount request to be deposit
金额:存款金额
transaction_url launch url of the payment gateway
交易连接:使用网关服务类型时所提供之银行交易连结
qr_image_url launch url of the payment for QR image link
交易连接:扫码服务类型会有二维码图片连结
trans_id Transaction id of the request generated by payment system
交易代码:由支付系统需求生成的账号
trans_time received transaction time format (JSON date format)
交易时间:收款时间的格式(JSON日期格式)
note Remarks
备注
备注:

Responce 响应

当您呼叫成功之后,会取得响应的参数如下,status = 1

{"status":1,"sign":"fu2nDjnbdmxU45qDKaw+Y9bT1+gzaVylsHDP0ivk4B11jl6Cir0v5J7TUvsXXKUqzgeoj2QFNj+p\rDZfCjDfLbtCjT3Kv+12goWr9ImW+u2QGetvpNCxzWvkp0cR4qrs1PLxF+bFPZTaKJmyJIceqy3LG\rb9fgDt4iz0HovDmp8bBqh8MTvzPHwv7crw9QwfQuTW+nfxQGtMfeGLkl1vDhzOzIWzC2kMCpUawY\rITatJzJQQ50Tn7bN3RUwLRCZgZFDz810yZUcb9oCWWaJ7MbNbc/S3ePt4+AjkQyEjQXQCR3ojMYd\rcrGz9H30/XZ0VDyYnezs71uTNnCszEX9xkeGzw==\r","data":"JXqb26w++IncEJ5W8OJFeVTKz+2eJaEbM0uts1XleU6htTQcwpBKTZ5VjiCe2jHf03/Qb9aJYA6s\rcql6UKcMQenbcnSDbkRjT9gYFyYxKnSDq/BCyIiNw1/ChSd2xEwq3c3NNsQhDg9XcwPAoo9npyqA\rytxJsNYy/Q0CuCWVOsVWGJsoFr8cof8HSf2j5w00KOke/09DscSghjCy9ROJluMkSfWDl/L4NN/h\rmItb/9+HisBvhzNhJfZms1GYAzU3oCOQykWQVdxPoqL4Q8ncI7LXbDtiLyZgwOjjj5dQqZNF9ZkN\rlDDbokfPJcDyImZj0Ioc5xceygqSHujeflpFo4ikd0/9vWZpgoBNyHs57d5vZsTLX7PtbJH3A9RS\rkLlYfGTJtIczozZIPhodUAvCq8sHE8qjgx/DSz2XSCEXC2lrpUv/oFVIe8Coa7U3a2N8k1LIldiv\rbvbtVn+cj09AdYQoN56vJ40aNiD1AdAEqS+IpfjTkV6tg29SJE2Uw6+cp08m+amBxRCFFfG6UPK0\r0pzDT6fluhp/7to6dTxSpXdnOkEoO5Te8jC7pXO4Jx28YApa/gdSV6hRuQ67DfNj8b1C3KU13ayQ\rzSY9CqfvvoV5bs6qsEtNn2o7kVTb+3yJp3h+mEYiz/PFWv4sM3q6JwCpTNJxB/rBZTK4ehoS+X+K\rnAUu01C2X9fKZgcWPx3EItKOUhvYvDPRa953mcrLYB41Dj+EKZHLr2Rd6emYQQ3kTfzldwjgUIno\resm4+FX48/m4esb/7TUvI1hRqKo5CwAG+lj7qVzzXiAVvlH+7RInV6QyHgmuyNraw4isj5saM4E0\rvswEBmsxo+BD32A/fOLKYewuUahgpZqWx+joJG6ZT8Tc49Y5XniewlqQzlvJD2XcJtSPNkJtSLIW\r8PxwwSSuPSFhL6sk57IErom12kPgXqZMvLB3qM2tEi2tiRJ7zX6KwNxqbAT1qidTDOG5LD3uifwY\rZXgf0L9iN3+hxgW9ArmHaUJgUi+AS+c+DK25\r","error_code":null,"error_msg":null}

若您呼叫失败的时候,会取得响应的参数如下,status = 0

{"status":0,"sign":null,"error_code":"E000XX","error_msg":"错误原因说明}

您可以透过这 status 参数的 0 或 1 去判断该笔充值申请是否成功

假设成功,您再把 data 透过 merchantPrivateKey 进行解密,会取得 json

{"amount":10,"trans_time":"2018-04-25 20:43:57","qr_image_url":null,"bank_card_num":null,"trans_id":120054975,"email":null,"bank_acct_name":null,"transaction_url":"http://pg2.ouyie.cn/ainong/230001/sender.do?senderKey=67bd1d07-63eb-41fc-b2f4-70fab4b67295","note":"-"}

透过 json 参数中的 transaction_url/qr_image_url 开启网关连结或者 QR Code

扫码的部份,请先取 qr_image_url,若 qr_image_url 回传是 unll 请取 transaction_url

2.2. Callback Deposit Result API 充值结果回调接口

this API start in jeepayment Server, request merchant in API 2.1 callback_url.

This api implements by the merchant to notify the deposit confirmation result.

Service End point : http://merchant provided deposit confirm url

Call back server if you use https, the TLS version only supports version 1.0,pushing failed above 1.0


此接口是由 jeepayment 发起,会去呼叫商户在 2.1 所输入的 callback_url 的连接位置。

此API用于充值成功时返回至商户方通知充值结果

接口地址: http://商户所提供充值回调地址

Call back server 如果使用 https 当中TLS 版本只支援1.0版,高于1.0会推送失败

Request Parameters 请求参数

Parameter
参数
Data Type
资料型态
Required
必要
Description
说明
deposit_time String (14)
字串 (14)
Yes
必填
exact deposit time that merchant user deposited
存款时间
bank_code String (16)
字串 (16)
Yes
必填
bank that merchant member deposited
商户用户存款银行
service_type String (2)
字串 (2)
Yes
必填
Please refer to service type table
服务类型:请参考附件 ( 服务类型列表)
amount String (12)
字串 (12)
Yes
必填
amount deposited by merchant member
金额:商户存款金额
merchant_user String (64)
字串 (64)
Yes
必填
merchant member member id
商户用户号
merchant_order_no String (64)
字串 (64)
Yes
必填
reference trans no of merchant for the transaction
订单号:详情请见商户转账订单号
trans_id String (64)
字串 (64)
Yes
必填
merchant member member id
转帐代码:支付存款交易代码
pay_card_num String (32)
字串 (32)
Yes
必填
payment transaction id of the deposit
支付卡号:商户支付卡号
pay_card_name String (32)
字串 (32)
Yes
必填
card acct name of merchant user that used for deposit
支付卡姓名:商户支付账号持卡人姓名
process_time String (14)
字串 (14)
Yes
必填
jeepayment process time
处理时间:交易处理时间

Response Parameters 响应参数

Please return a JSON string once received callback data. e.g. {"error_msg":"","status":"1"}

接收到回调后请返回符合JSON格式之error_msg與status, 例如 {"error_msg":"","status":"1"}

Parameter
参数
Description
说明
error_msg Any string message why its failed
任何失败的讯息
status 1 = success , 0 = failed
1 表示成功,0 表示失败

充值结果回调
会先收到这个格式 sign=XXXXXXXXX&data=XXXXXXXXXXXX&merchant_code=XXXXXX
把data解密出来格式如下 {"amount":10,"trans_id":120XXX850,"pay_card_name":null,"process_time":"2018-08-14 10:25:07","merchant_order_no":"15XXXXX9057","service_type":1,"deposit_time":"2018-08-14 10:25:07","merchant_user":"加多宝","bank_code":"0102","pay_card_num":null}
充值时没有状态,我司只有在充值成功时才发送回调
也就是充值有回调就是代表成功,没发送回调就是玩家尚未充值完成或充值失败

2.3. Withdraw Request API 提现申请接口

This api is use to request a withdraw in the system

Service End point : https://api.yoopayment.com/rsa/withdraw


此接口用于提现申请

接口地址: https://api.yoopayment.com/rsa/withdraw


Request Parameters 请求参数

Parameter
参数
Data Type
资料型态
Required
必要
Description
说明
bank_code String (16)
字串 (16)
Yes
必填
bank code selected from the channel list api, only service types = payment Gateway E-bank and
Withdraw required to input, other service types please ignore.
银行代码:目前只有服务类型网关与提现会使用到,其他请放空值。
amount String (12)
字串 (12)
Yes
必填
amount to be withdraw
金额:此金额为提现金额,以元为单位,可抓取找小数点2位
merchant_user String (64)
字串 (64)
Yes
必填
merchant member reference
商户用户号:可自定义
merchant_order_no String (64)
字串 (64)
Yes
必填
reference trans no of merchant for the transaction
(This id must be unique to the merchant, otherwise the request is rejected)
商户自定之订单号
(订单号不可重复否则会被退回)
platform String (8)
字串 (8)
Yes
必填
parameter = 'PC' is a constant
请带入常数值PC
card_num String (32)
字串 (32)
Yes
必填
card number of merchant user(USDT Wallet Address fill in the field)
银行卡卡号(USDT钱包地址填写位置)
card_name String (32)
字串 (32)
Yes
必填
card acct name of merchant user
银行卡姓名
bank_branch String (128)
字串 (128)
Yes
必填
bank branch of the card
银行卡分行(CNY必填,其他币种可放空值)
bank_province String (128)
字串 (128)
Yes
必填
bank province of the card
银行卡省份(CNY必填,其他币种可放空值)
bank_city String (128)
字串 (128)
Yes
必填
bank city of the card
银行卡城市(CNY必填,其他币种可放空值)
callback_url String (4000)
字串 (4000)
No
非必填
Notification / Callback url once withdraw process is completed
(If this is blank the one in the Merchant console will be the one to use)
出款成功后的回调地址

Response Parameters 响应参数

Parameter
参数
Description
说明
trans_id Transaction id of the request generated by payment system
由支付系统需求生成的交易号
trans_time received transaction time format (JSON date format)
交易时间:收款时间的格式(JSON日期格式)

2.4. Callback Withdraw Result API 提现结果回调接口

this API start in jeepayment Server, request merchant in API 2.3 callback_url.

This api is use for notifying the merchant of the result of withdraw request.

Service End point : http://merchant provided withdraw result url

Call back server if you use https, the TLS version only supports version 1.0,pushing failed above 1.0


此接口是由 jeepayment 发起,会去呼叫商户在 2.3 所输入的 callback_url 的连接位置。

这个接口用于通知提现申请之结果

接口地址: http://商户所提供回调地址

Call back server 如果使用 https 当中TLS 版本只支援1.0版,高于1.0会推送失败


Request Parameters 请求参数

Parameter
参数
Data Type
资料型态
Required
必要
Description
说明
trans_id String (64)
字串 (64)
Yes
必填
payment transaction id
支付号
merchant_order_no String (64)
字串 (64)
Yes
必填
bank that merchant member deposited
支付商户订单号
merchant_user String (64)
字串 (64)
Yes
必填
merchant user member id
商户用户号
status String (1)
字串 (1)
Yes
必填
1 = Success or 0 = Failed
1 表示成功,0表示失败
amount String (12)
字串 (12)
Yes
必填
withdraw amount processed
代付金额
process_time String (14)
字串 (14)
Yes
必填
jeepayment process time of the withdraw
代付申请时间

Response Parameters 响应参数

Please return a JSON string once received callback data. e.g. {"error_msg":"","status":"1"}

接收到回调后请返回符合JSON格式之error_msg與status, 例如 {"error_msg":"","status":"1"}

Parameter
参数
Description
说明
error_msg Any string message why its failed
任何失败的讯息
status 1 = success , 0 = failed
1 表示成功,0 表示失败

提现结果回调
会先收到这个格式 sign=XXXXXXXXX&data=XXXXXXXXXXXX&merchant_code=XXXXXX
把data解密出来格式如下
{"amount":100,"status":0,"trans_id":1200XXXX2,"process_time":"2018-05-10 19:30:49","merchant_order_no":"152XXXXX8951","merchant_user":"user01"}
这时就需要贵司解密data 判断status
现有分成功与失败,所以解密data后才有status参数可提供判断成功与失败

2.5. Get Balance API 查询帐户馀额接口

This api is use to request a get balance in the system

Service End point : https://api.yoopayment.com/rsa/balance


此接口用于查询帐户馀额接口

接口地址: https://api.yoopayment.com/rsa/balance


Request Parameters 请求参数

Parameter
参数
Data Type
资料型态
Required
必要
Description
说明
merchant_order_no String (64)
字串 (64)
Yes
必填
bank that merchant member deposited
由支付系统商提供的商户交易号

Response Parameters 响应参数

Parameter
参数
Description
说明
holding_balance Merchant holding balance
冻结金额
outstanding_balance Merchant outstanding balance
未结算金额
current_balance Merchant current balance
已结算金额

2.6. Query Order API 查询订单状态接口

This api is use to request a get query order in the system

Service End point : https://api.yoopayment.com/rsa/query-order


此接口用于查询订单状态接口

接口地址 : https://api.yoopayment.com/rsa/query-order


Request Parameters 请求参数

Parameter
参数
Data Type
资料型态
Required
必要
Description
说明
merchant_order_no String (64)
字串 (64)
Yes
必填
bank that merchant member deposited
由支付系统商提供的商户交易号

Response Parameters 响应参数

Parameter
参数
Description
说明
amount amount of order be queried
金额:此金额为订单金额
trans_status trans_status
请藉由『trans_status』此值,来判断该笔订单的状态:
若为充值单号:
S = 通过,P = 申请中
S = SUCCESS , P = PENDING,

若为提现单号:
P = 等待中,F = 失败/拒绝, Y = 已支付, I = 支付中, C = 撤单
P = PENDING, F = FAILED/REJECT, Y = PAID, I = PAYING, C = REFUNDED
trans_id trans_id
由支付系统商提供的厂商交易号

若成功的返回数据格式,将如下
{"status":1,"sign":"xxxxxxxxx","data":"xxxxxxxxx","error_code":null,"error_msg":null}

此部份您同样需要用商户私钥来解密data值, 解密后的明文参数格式如下
{"amount":XXX,"trans_status":"xxx","trans_id":xxxxxxx}
PS. 另若此部份返回字串如:
{"status":0,"sign":null,"error_code": "E00015","error_msg":"order number does not exist (订单号不存在)"}

即为错误代码E00015,代表查询的单号于我方后台不存在,
请确认是否有成功发起申请或是单号是否正确。

3.1. Error Code List错误代码列表

Error Code
错误代码
Description
说明
E00001 merchant not found (商户不存在)
E00002 missing required parameter (缺少参数)
E00003 sign error (签名档错误)
E00004 invalid request amount (请求金额无效)
E00005 merchant_order_no already exists (订单号已存在)
E00006 insufficient merchant balance (商户馀额不足)
E00007 invalid bank code (错误的银行代码)
E00008 maintenance mode (系统维护中)
E00009 service type is not allowed for the merchant (商户不允许使用此服务类型)
E00010 unknown service error (未知的服务器错误)
E00012 ip is not allowed (IP 是不允许拜访,需要加白名单)
E00013 invalid parameter format (无效的参数格式)
E00014 no channel is available for this merchant (此商户没有可用的渠道,商户帐号设置错误)
E00015 order number does not exist (订单号不存在)
E00016 merchant is over the deposit quota limit (商户充值额度已达上限)
E00017 get balance API to be used every 5 seconds only (帐户馀额请求请勿在5秒内重复尝试)
E00018 transaction already exist (交易已经存在)
E00019 transaction does not exist (交易不存在)
E00020 invalid transaction status (交易状态无效)
E00021 third party error (第三方错误)
E00022 invalid encryption key (无效的加密公钥)
E00023 missing encryption public (商户公钥未提交)

3.2. Service Types服务类型

Service Type Code
服务类型代码
Description
说明
1 Payment Gateway E-Bank (网关)
2 Wechat QR (微信扫码)
3 Alipay QR (支付宝扫码)
4 QQ QR (QQ扫码)
5 JD QR
7 UnionPay (快付快捷)
8 Wechat WAP (微信WAP)
9 Alipay WAP (支付宝WAP)
10 QQ WAP (QQWAP)
11 UnionPay QR (银联扫码)
12 JD WAP (京东WAP)
13 UnionPay WAP (银联快捷)
15 quickpay QR (云闪付)
16 Wechat Transfer (微信转账)
17 Alipay Transfer (支付宝转账)
18 Wechat Fix QR (微信固码)
19 Alipay Fix QR (支付宝固码)
20 Integration Payment QR (聚合扫码)
22 PGMT (网关转账)
24 Alipay N WAP (支付宝非原生)
25 Wechat N WAP (微信非原生)
26 Alipay PDD (支付宝拚多多)
27 Wechat PDD (微信拚多多)
28 Zalo (ZALO)
29 Momo (MOMO)
30 Rechargeable Card (越南充值卡)
31 Viettelpay (Viettelpay充值)
32 Thai Bank QR (泰国扫码)
33 Viettelpay Fix QR (Viettelpay固码)
34 Alipay Phone Charge (支付宝话费)
35 Wechat Phone Charge (微信话费)
36 VIP Quickpay (VIP快付)
60 USDT (虚拟币)

3.3. Bank Code List 银行代码列表

Bank Code
银行代码
Bank Initials
银行缩写
Bank Name
银行名称
0101 CMB 招商银行
0102 ICBC 中国工商银行
0103 CCB 中国建设银行
0104 SPDB 浦东发展银行
0105 ABC 中国农业银行
0106 CMBC 民生银行
0107 CIB 兴业银行
0109 CEB 光大银行
0110 BOC 中国银行
0111 BOB 北京银行
0112 HKBEA 东亚银行
0113 CBHB 渤海银行
0114 PINGAN 平安银行
0116 SRCB 上海农商银行
0117 PSBC 中国邮政储蓄银行
0118 CITIC 中信银行
0119 NBCB 宁波银行
0120 RIZHAO 日照银行
0121 HEB 河北银行
0122 HNNXS 河南农信社
0123 HXB 华夏银行
0124 WHCCB 威海市商业银行
0125 CQRCB 重庆农村商业银行
0126 DALIAN 大连银行
0127 FUDIAN 富滇银行
0128 BOS 上海银行
0129 COMM 交通银行
0130 SZPAB 深圳平安银行
0131 GDB 广发银行
0132 SDB 深圳发展银行
0133 HZB 杭州银行
0134 BJCRB 北京农商银行
0135 CZB 浙商银行
0136 ZJTLCB 浙江泰隆商业银行
0137 NJCB 南京银行
0138 HFB 恒丰银行
0139 GZCB 广州银行
0140 HSB 恒生银行
0142 POST 中国邮政
0143 UPOP 中国银联
0144 HSBK 徽商银行
0146 UCB 城市商业银行
0147 CTC 中国信托商业银行
0148 RCB 大连农商银行
0149 HRBB 哈尔滨银行
0160 KLUN 昆仑银行
0161 AQCU 安徽农商银行
0650 USDT USDT
0701 THB_SCB Siam Commercial Bank
0702 THB_KTB Krung Thai Bank
0703 THB_BAY Krungsri (Bank of Ayudhya Public Company Limited)
0704 THB_UOB UOBT
0706 THB_KKB Kasikorn Bank
0707 THB_BBL Bangkok Bank
Withdraw Is No Support/下发不支持 城市商业银行,信用卡,企业卡
银行清单请至后台参阅下载 For other banks, please go to the platform to download
交易 → 下发服务 → 批量代付记录 → 下载银行清单
Transactions → Withdraw Service → Withdraw Batch Records → Download Bank List

3.4. RAS key生成

请先登入 jeepayment 商户后台,使用系统里面的账号信息商户环境 生成



3.5. BANK CODE下载

请先登入 jeepayment 商户后台,使用交易里面的下发服务批量代付记录 下载银行清单