(1)JayaPay API Reference
This document is intended for technical personnel with development capabilities
Java language can directly refer to the Java code example on the right
You are welcome to contact us, please contact Steven on Telegram Messenger 👨💻 Caesar. Welcome to consult.
(2)Description
Unified request method
HTTP POST
ContentType
application/json
sign
The dark area on the right is the signature tool class
import com.google.gson.JsonObject;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* <p>
* JayaPay RSA Sign Util
* </p>
*
* @author JayaPay
*/
public class JayaPayRequestUtil {
/**
* Verify Sign
* @param params
* @return
*/
public static boolean verifySign(JsonObject params, String publickey) throws InvalidKeySpecException, NoSuchAlgorithmException {
String platSign = params.remove("platSign").getAsString(); // 签名
List<String> paramNameList = new ArrayList<>(params.keySet());
Collections.sort(paramNameList);
StringBuilder stringBuilder = new StringBuilder();
for (String name : paramNameList) {
stringBuilder.append(params.get(name));
}
System.out.println("keys:" + stringBuilder);
String decryptSign = publicDecrypt(platSign, getPublicKey(publickey));
System.out.println("decryptSign:" + decryptSign);
return stringBuilder.toString().equals(decryptSign);
}
/**
* Private Encrypt
* @param data
* @param privateKey
* @return
*/
public static String privateEncrypt(String data, RSAPrivateKey privateKey){
try{
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
return Base64.encodeBase64String(rsaSplitCodec(cipher, Cipher.ENCRYPT_MODE, data.getBytes("UTF-8"), privateKey.getModulus().bitLength()));
}catch(Exception e){
throw new RuntimeException("encrypt error", e);
}
}
/**
* Public Decrypt
* @param data
* @param publicKey
* @return
*/
public static String publicDecrypt(String data, RSAPublicKey publicKey){
try{
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, publicKey);
return new String(rsaSplitCodec(cipher, Cipher.DECRYPT_MODE, Base64.decodeBase64(data), publicKey.getModulus().bitLength()), "UTF-8");
}catch(Exception e){
throw new RuntimeException("Decrypt Error", e);
}
}
/**
* get a privateKey
*/
public static RSAPrivateKey getPrivateKey(String privateKey) throws NoSuchAlgorithmException, InvalidKeySpecException {
//PKCS#8 encode Key
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKey));
RSAPrivateKey key = (RSAPrivateKey) keyFactory.generatePrivate(pkcs8KeySpec);
return key;
}
/**
* getPublicKey
* @param publicKey
*/
public static RSAPublicKey getPublicKey(String publicKey) throws NoSuchAlgorithmException, InvalidKeySpecException {
//X509 Key
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKey));
RSAPublicKey key = (RSAPublicKey) keyFactory.generatePublic(x509KeySpec);
return key;
}
private static byte[] rsaSplitCodec(Cipher cipher, int opmode, byte[] datas, int keySize){
int maxBlock = 0;
if(opmode == Cipher.DECRYPT_MODE){
maxBlock = keySize / 8;
}else{
maxBlock = keySize / 8 - 11;
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] buff;
int i = 0;
try{
while(datas.length > offSet){
if(datas.length-offSet > maxBlock){
buff = cipher.doFinal(datas, offSet, maxBlock);
}else{
buff = cipher.doFinal(datas, offSet, datas.length-offSet);
}
out.write(buff, 0, buff.length);
i++;
offSet = i * maxBlock;
}
}catch(Exception e){
throw new RuntimeException("["+maxBlock+"]", e);
}
byte[] resultDatas = out.toByteArray();
IOUtils.closeQuietly(out);
return resultDatas;
}
public static String doPost(String url,String json) throws IOException {
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
StringEntity s = new StringEntity(json);
s.setContentEncoding("UTF-8");
s.setContentType("application/json");//json contentType
post.setEntity(s);
HttpResponse res = client.execute(post);
if(res.getStatusLine().getStatusCode() == HttpStatus.SC_OK){
return EntityUtils.toString(res.getEntity());// return json
}
return null;
}
}
Unified signature generation rules:
RSA-based signature verification method。
After sorting the keys of all non-empty parameters according to ASCII, take the parameter value (excluding the key) for splicing
Use the RAS algorithm to calculate the string to calculate the signature string.
parameter example values
parameter | type |
---|---|
merchantCode | S820211021094748000001 |
method | BCA |
orderNum | T1642592278863 |
payMoney | 150.60 |
productDetail | Test Pay |
notifyUrl | your notify ur |
dateTime | 2022-01-01 10:55:00 |
name | JackMa |
expiryPeriod | 1440 |
[email protected] | |
phone | 082122965511 |
concatenate strings
Example
First, sort by ASCII according to the parameter Key, and encrypt the string after sorting.
StrA = 2022-01-01 10:55:[email protected] notify
urlT1642593166888150.60082122965511Test Pay
Calculate the signature
Use the key pair you configured in the JayaPay merchant background, encrypt and calculate
RSA (StrA) with your private key to obtain the final signature string:
sign = IMLn23c4orM+7pZhHoRmbjrol4X33jeAqFxbZuQ+pnznBIGhb6Ail3qQPmKwcuhNCt536nmldpbWI72
k1lDxd0zZ95ZHElcNzwTFHFKtd8063uy6rFaxaW6DQ47t4U/95dpGfHAZe0GiIFAQ6xQquaoLINyQa4QqL+cpB
JFEg1dyW6GYLFSdJnx7ycQvFYllmOpGZmdPLny62GvrCWvkiIARUsmc9fpkpTx5UQEDTgmhwdCKBkhHVsx2AiQ
bYDxZ5WBuU1GZeiJjPuzSxvzWP6VoQBsfpwTI5kdJs6aQCekGO2/YScD+tGgrm2J89Pc/axPcb1xZzsi5SxpWh
feabQ\u003d\u003d
(3)Configure Merchant Public Key Information
1.Bind Google verification code
Log in to the backend of the merchant -> Personal Center -> Security Information, use Google Authenticator to scan the QR code on the page to bind your account
2.RSA key pair generation address
POST http://pay.hehebo.com:15082/index-rsa.jsp
3.Configure public key
Click Personal Center -> Transaction Information Configuration, fill in your public key information and save it. Configuration is complete
4.Merchant background address
https://merchant.jayapayment.com/
(4)Collection
1.Collect and place an order
Collection orders support legal currency and digital currency (USDT/BTC/ETH/TRX) transactions
If you want to use digital currency transactions, please set orderType=1, and pass in the corresponding Currency and netWork
When using digital currency for transactions, the currency and netWork is required, you need to tell us which digital currency you want to use for transactions
The currencies that can be used temporarily only support USDT now
Also you need to tell us which network (TRC20/BEP20/OMNI/ERC20/TRX) you want to use for trading
Currently available network is TRC20
We will launch transactions in other currencies and networks in the future, please to Stay tuned
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Map;
import java.util.TreeMap;
public class JayaPayDemo {
// test account
private static final String MCH_CODE = "S820211021094748000001"; // business number
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // Platform public key
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // Merchant private key
private static final String payUrl = "https://doc.jayapayment.com/gateway/prepaidOrder";
private static final String cashUrl = "https://doc.jayapayment.com/gateway/cash";
private static final String payNotify = "your notify url";
private static final String cashNotify = "your notify url";
public static void main(String[] args) throws Exception {
// Collection
pay();
}
private static void pay() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_CODE);
requestParams.put("orderType", "0"); // Order Type(0-Fiat currency transaction,1-Cryptocurrency transaction)
requestParams.put("method", "BCA"); // payment method
requestParams.put("orderNum", "T1642592278863"); // merchant's OrderNum
requestParams.put("payMoney", "150"); // transaction money
requestParams.put("productDetail", "Test Pay");// productDetail
requestParams.put("name", "JackMa");// customer name
requestParams.put("phone", "082122965511"); // phone
requestParams.put("email", "[email protected]");// customer email
requestParams.put("notifyUrl", payNotify);// callback url
requestParams.put("dateTime", "20220101235959");// yyyyMMddHHmmss
requestParams.put("expiryPeriod", "1440"); //
requestParams.put("currency", "USDT"); // currency(orderType=1,required)
requestParams.put("netWork", "TRC20"); // chain network(orderType=1,required)
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); //
}
String keyStr = stringBuilder.toString(); //
System.out.println("keyStr:" + keyStr);
String signedStr = JayaPayRequestUtil.privateEncrypt(keyStr, JayaPayRequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // 私钥加密
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = JayaPayRequestUtil.doPost(payUrl, postJson); //post json request
System.out.println("Response Msg:" + responseJson);
}
}
<?php
// platform public key, from Secret key config
$platPublicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiaKBgQCcEUIvQ/5L+SWbHOeR8VFeZvLbUk7V7OeEAQlQwIVLSZMTef3KtsOKKAsUYPf/aAcKRzZZXECODsPQiDPcdZvM/rFkgrFWkR7lPjTj5SiPxGaiK2Z2sne7A8aDF7fV/D7lfmEwNdZ7FWKVEB84/81BHnlGUwb5HpRTISG+boSO6wIDAQAB';
// mchchant private key
$mchPrivateKey = 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMigm7rtWnTeNagwFzGTH+Uw1ypbiy7VhIoFJbgSYSSHdCaXWdT/l2+2fQlEYgAETVZ/IXB29MCnrf3O0dwRFXiipIbsm5zyqSLiS6cKXe8zN1/PlQWUbEt5wyWm0GADB/4bV6eu6gA7sGXmjQqrzfKZkcie3aK7+7ry1NFxTI51AgMBAAECgYEAklqXQAVlt1tiSQ7L3J425jp6u6uMHN4lkYmvuleuBbfKQ1yla3wIPLYjAF+iHeEFidOz0Rb19JRdmIkHDkJoJg2W27LvO6RdUwzgRnsuA3OuNz97w08B3aXXbPmB91nTFjKSlUsbh3IQWP71noxW+iKn844EW5hC5Gvn4L3quAECQQDrz1r0VKIbBSBB2aLuz1XyD/TBT2aRhvOKf0XtTRiQhNjtJxoQmvNbbhvUwj8an7HyCuihAbdbrC2ymFFyOSDZAkEA2c4Yudi48C6COrroi1cWgPlEFeGJXP/V1k5loZ1n2vstYAGPhAB4wUnFBLDvMqaBzWJt7MRkiazT8KnBQCDY/QJAMXpNlEyZwt+deBOpO0BnwSWV7mWxmMFfImU4D+WITPbC7aexsWBBxaJh1o93XCe715RwYTAR//stj3akSDoyaQJAa4FKuxC51/Nc3Fg9R+modeiTLqmv/3NXvPvdNjRXesLX1rduex0wfVdII9ShfEKrdxDKaT9W0NyzD+r6NAkCkQJBAMAnTgPYf0f7rh417GdoP7R7Nwi8KBKwPHlmfRukibOQlKt9xjqpsKJwglLn8pcnXbYbswXIdqzuBvIGAe3OWNg=';
// merchent ID from idntask, from User info
$merchantCode = 'YOUR_MERCHANT_CODE_HERE';
// pay money
$payMoney = '20000';
// Order Type(0-Fiat currency transaction,1-Cryptocurrency transaction)
$orderType = '0';
// Payment method of your choice refer: method filed
$method = 'FT';
// Merchant system unique order number
$orderNum = 'T'.date("YmdHis",time());
// The virtual account description
$productDetail = 'Test Pay';
$dateTime = date("YmdHis",time());
// Customer's email address
$email = '[email protected]';
// Customer's mobile number
$phone = '082112345678';
// Display name on bank confirmation display
$name = 'Neo';
// url for callback
$notifyUrl = 'http://example.com/callback';
$expiryPeriod = '1000';
$params = array(
'merchantCode' => $merchantCode,
'orderType' => $orderType,
'method' => $method,
'orderNum' => $orderNum,
'payMoney' => $payMoney,
'name' => $name,
'email' => $email,
'phone' => $phone,
'notifyUrl' => $notifyUrl,
'dateTime' => $dateTime,
'expiryPeriod' => $expiryPeriod,
'productDetail' => $productDetail
);
ksort($params);
$params_str = '';
foreach ($params as $key => $val) {
$params_str = $params_str . $val;
}
$sign = pivate_key_encrypt($params_str, $mchPrivateKey);
$params['sign'] = $sign;
$params_string = json_encode($params);
$url = 'https://openapi.jayapayment.com/gateway/prepaidOrder';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($params_string))
);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
//execute post
$request = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($httpCode == 200)
{
$result = json_decode($request, true);
echo "platRespCode :". $result['platRespCode'] . "\n";
echo "platRespMessage :". $result['platRespMessage'] . "\n";
echo "platOrderNum :". $result['platOrderNum'] . "\n";
echo "orderNum :". $result['orderNum'] . "\n";
echo "method :". $result['method'] . "\n";
echo "name :". $result['name'] . "\n";
echo "email :". $result['email'] . "\n";
echo "vaNumber :". $result['vaNumber'] . "\n";
echo "payMoney :". $result['payMoney'] . "\n";
echo "payFee :". $result['payFee'] . "\n";
echo "productDetail :". $result['productDetail'] . "\n";
echo "platSign :". $result['platSign'] . "\n";
$decryptStr = public_key_decrypt($result['platSign'], $platPublicKey);
echo "decryptStr :". $decryptStr . "\n";
}
else {
echo $httpCode;
}
function pivate_key_encrypt($data, $pivate_key)
{
$pivate_key = '-----BEGIN PRIVATE KEY-----'."\n".$pivate_key."\n".'-----END PRIVATE KEY-----';
$pi_key = openssl_pkey_get_private($pivate_key);
$crypto = '';
foreach (str_split($data, 117) as $chunk) {
openssl_private_encrypt($chunk, $encryptData, $pi_key);
$crypto .= $encryptData;
}
return base64_encode($crypto);
}
function public_key_decrypt($data, $public_key)
{
$public_key = '-----BEGIN PUBLIC KEY-----'."\n".$public_key."\n".'-----END PUBLIC KEY-----';
$data = base64_decode($data);
$pu_key = openssl_pkey_get_public($public_key);
$crypto = '';
foreach (str_split($data, 128) as $chunk) {
openssl_public_decrypt($chunk, $decryptData, $pu_key);
$crypto .= $decryptData;
}
return $crypto;
}
2.Request address
The default docking mode is H5 cashier mode. If you need to dock with API cashier mode, you need to contact customer service to apply for whitelisting before docking.
Cashier (Mode 1):
POST https://openapi.jayapayment.com/gateway/prepaidOrder
Api (mode 2):
POST https://openapi.jayapayment.com/gateway/pay
Mode 2 QRIS will return two kinds of data QR code Url and QR code original data, which can be judged by whether payData starts with Http.
request parameters
parameter | type | Required | describe | Example |
---|---|---|---|---|
merchantCode | string(32) | Y | Merchant ID, obtained from the merchant platform | S820211021094748000001 |
orderType | string(10) | Y | Order type | 0-Fiat currency transaction,1-Cryptocurrency transaction |
method | string(16) | N | Payment method (If you need to specify a payment method, you can select one of the sample payment methods on the right; if you do not specify a payment method, you can omit this parameter, and you can choose a payment method on our cashier page.) | BCA MANDIRI PERMATA CIMB BNI MAYBANK DANAMON BRI BSI BNC OVO DANA LINKAJA SHOPEEPAY QRIS GOPAY_QRIS ALFAMART TRANSFER_BCA |
orderNum | string(64) | Y | Merchant order number | 10000001 |
payMoney | int(10) | Y | Payment amount | 15000(must be Integer) |
productDetail | string(100) | Y | Payment description | Test goods |
notifyUrl | string(164) | Y | Asynchronous notification address for successful order payment | https://host:port/notifyUrl |
dateTime | string(32) | Y | Timestamp format:yyyyMMddHHmmss | 20190101235959 |
name | string(64) | Y | client's name | Jack |
string(64) | N | User email | [email protected] | |
phone | string(32) | Y | User mobile number | 1234567890 |
expiryPeriod | int(5) | Y | Order expiration time (unit: minutes) | 720 |
4.Request message example
{
"merchantCode": "S820211021094748000001",
"orderType": "0",
"method": "BCA",
"orderNum": "T1642593166888",
"payMoney": "10000",
"productDetail": "Test Pay",
"notifyUrl": "your notify url",
"dateTime": "2022-01-01 10:55:00",
"expiryPeriod": "1440",
"name": "JackMa",
"email": "[email protected]",
"phone": "082122965511",
"sign": "fnbSOvY83pr8hXg+FdNNYi2ubQUGNv/qGYc4TjRl+Xxd1yc9fpkpTx5UQEDTgmhwdCKBkhHVsx2AiQbYDxZ5WBuU1GZeiJ"
}
5.response parameters
parameter | type | Required | describe | Example |
---|---|---|---|---|
platRespCode | String | Y | Whether the request business is successful | FAIL\SUCCESS |
platRespMessage | String | Y | Interface response information prompt | Request Transaction Success |
platOrderNum | String | Y | Platform order number | PI1453242857400963072 |
payMoney | int(10) | Y | Payment amount | 15000(must be Integer) |
payFee | double | Y | Handling fee amount | 5.32 |
method | String | Y | payment method | CIMB、BCA 、BRI、PERMATA、MANDIRI |
productDetail | String | Y | Product Details | apple |
name | String | Y | client's name | Jack |
String | Y | customer mail | [email protected] | |
orderNum | String | Y | Merchant order number | 23645782 |
url | Object | N | Cashier link | Requesting the cashier to place an order (mode 1),Returned when 'platRespCode' is SUCCESS |
payData | Object | N | Payment Information | Request collection and order placement (mode 2),Returned when 'platRespCode' is SUCCESS |
6.Example of successful response message
Example of successful response message for placing an order at the cashier (mode 1)
{
"platOrderNum": "BCA1483771634191044608",
"payMoney": "10000",
"payFee": "10",
"method": "BCA",
"productDetail": "Test Pay",
"name": "JackMa",
"orderNum": "T1642593166888",
"platRespCode": "SUCCESS",
"platRespMessage": "Request Transaction Success",
"url": "https://openapi.jayapayment.com/gateway/order/BCA123456789",
"email": "[email protected]"
}
Example of successful response message for order collection (mode 2)
{
"platOrderNum": "BCA1483771634191044608",
"payMoney": "150",
"payFee": "16",
"method": "BCA",
"productDetail": "Test Pay",
"name": "JackMa",
"orderNum": "T1642593166888",
"platRespCode": "SUCCESS",
"platRespMessage": "Request Transaction Success",
"payData": "874961198466",
"email": "[email protected]"
}
Example of successful response message for order collection (Api mode 2) method="TRANSFER_XXX"
payData parameter description
Parameter | Type | Description | example |
---|---|---|---|
payeeBankCard | string | payment card number | 12345689 |
payeeBankUsername | string | payee name | Cardholder Name |
payeeBankName | string | receiving bank | BRI |
matchRule | string | payment matching method and RANDOM_AMOUNT is the random amount | RANDOM_AMOUNT |
matchingId | string | The matchingId in payData is the payment matching value. There are different data according to different matching rules. | 20099 |
When the matchRule in payData is RANDOM_AMOUNT, please use the matchingId in payData for the actual payment amount.
{
"method": "TRANSFER_XXX",
"productDetail": "test",
"orderNum": "202310222760012",
"platRespCode": "SUCCESS",
"platOrderNum": "PT193B35EC8D404025",
"payMoney": "20000",
"payFee": "0",
"name": "test",
"platRespMessage": "Request Transaction Success",
"payData": "{\"payeeBankCard\":\"123456789\",\"payeeBankUsername\":\"CardholderS Name\",\"matchingId\":\"20076\",\"payeeBankName\":\"BRI\",\"matchRule\":\"RANDOM_AMOUNT\"}",
"email": "[email protected]"
}
Failure response message example
{
"platRespCode": "FAIL",
"platRespMessage": "the orderNum already exists"
}
7.receive asynchronous notifications on behalf of
Please note: The current collection business will only have a callback notification when the order payment is successful.
When verifying the signature, you must use the Platform Public Key
provided in Merchant Backstage - Collection and Payment Configuration-API Configuration
for decryption! ! !
After accepting the asynchronous notification, you need to respond with the SUCCESS
string
Otherwise JayaPay will continue to initiate 5 notifications
import com.google.gson.JsonObject;
public class JayaPayNotify {
// Test account
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
public static void main(String[] args) throws Exception {
JsonObject notifyBody = new jsonObject();
boolean verifyResult = JayaPayRequestUtil.verifySign(notifyBody,PLAT_PUBLIC_KEY);
if (verifyResult) {
// ... The signature verification is passed and normal business logic is processed.
} else {
// ... Signature verification error
}
}
}
<?php
$res = json_decode(file_get_contents('php://input'), true);
$platSign = $res['platSign'];
unset($res['platSign']);
$public_key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFJ/AmUV4Z8udG8aOBUt/kEwc/DbxF5Gtfw6Y00NHQ4Pz2X2x9IxjUZxn2dnFxmrmhqKNlfwXOqyejhBzi0pSHyGoI4XP9IEfZGO6YkSb9DCY1ZxX8fDl2G+tPCbWYTVO4JutFmzTWgk1Uhhu6L9dlOMUHvZf3/6czA/a9C7azXwIDAQAB';
$decryptSign = public_key_decrypt($platSign, $public_key);
$params = $res;
ksort($params);
$params_str = '';
foreach ($params as $key => $val) {
$params_str = $params_str . $val;
}
if($params_str == $decryptSign) {
if($res['code'] == '00') {
echo 'success';
}
else {
echo 'fail';
}
}
else {
echo 'fail';
}
function public_key_decrypt($data, $public_key)
{
$public_key = '-----BEGIN PUBLIC KEY-----'."\n".$public_key."\n".'-----END PUBLIC KEY-----';
$data = base64_decode($data);
$pu_key = openssl_pkey_get_public($public_key);
$crypto = '';
foreach (str_split($data, 128) as $chunk) {
openssl_public_decrypt($chunk, $decryptData, $pu_key);
$crypto .= $decryptData;
}
return $crypto;
}
parameter | describe | Example |
---|---|---|
code | response status | 00 |
msg | response information | SUCCESS |
status | Payment result | SUCCESS (Refer to Appendix I - the status subsection of the first chapter of collection) |
platOrderNum | Platform order number | BK_1563278763273 |
orderNum | Merchant order number | T1231511321515 |
method | payment method | Requested method |
name | client's name | Neo |
payMoney | Collection amount | 100000 |
payFee | handling fee | 500 |
Customer mailbox | [email protected] | |
platSign | Platform signature | ja6R8eukQY9jc8z |
8.Asynchronous notification message example
{
"code": "00",
"msg": "SUCCESS",
"status": "SUCCESS",
"platOrderNum": "BCA1483771634191044608",
"orderNum": "T1642593166888",
"method": "BCA",
"name": "JackMa",
"payMoney": "150",
"payFee": "16",
"email": "[email protected]",
"phone": "123456789",
"platSign": "ja6R8eukQY9jc8zrhtf34654ungj7u8sdgdfjfs"
}
(5)Digital collection ordering
Collection orders support legal currency and digital currency (USDT/BTC/ETH/TRX) transactions If you want to use digital currency transactions, please set orderType=1;
Distinguish transactions between different users through merchant user IDs
Our digital collection of orders is divided into two modes: with order mode and without order mode.
Ex: Cashier version (v 1.0 and v 3.0 belong to the single mode version; v 2.0 and v 4.0 belong to the single mode version)
Ex: v 1.0, v 2.0-only display payment address
Ex:v 3.0, v 4.0-two ways to display QR code and payment address
You need to tell us which digital currency and chain network you want to use for transactions (TRC 20/BEP 20/OMNI/ERC 20/TRX) We will launch transactions in other currencies and networks in the future, so stay tuned
1.code example
The code example is for reference only. For specific parameter descriptions, please refer to Request Parameter Description
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Map;
import java.util.TreeMap;
public class JayaPayDemo {
// Test account
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String payUrl = "https://openapi.jayapayment.com/gateway/prepaidOrder";
private static final String cashUrl = "https://openapi.jayapayment.com/gateway/cash";
private static final String payNotify = "your notify url";
private static final String cashNotify = "your notify url";
public static void main(String[] args) throws Exception {
pay();
}
private static void pay() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("orderType", "1"); // Order Type (1-Digital Currency Transaction)
requestParams.put("mchUserId", "10001"); // MerchantUserID
requestParams.put("method", "USDT"); // Digital currency type USDT/BTC/ETH/TRX (optional)
requestParams.put("orderNum", "T1642592278863"); // Merchant order number (must be passed when there is an order, not when there is no order)
requestParams.put("payMoney", "1.000001"); // Order amount (up to 6 decimal places supported)
requestParams.put("name", "JackMa");// client's name
requestParams.put("phone", "082122965511"); // Phone number
requestParams.put("email", "[email protected]");// Customer email
requestParams.put("notifyUrl", payNotify);//callback address
requestParams.put("dateTime", "20220101235959");// Timestamp format yyyyMMddHHmmss
requestParams.put("expiryPeriod", "1440"); // Expiration time unit (minutes)
requestParams.put("currency", "USDT"); // Digital currency currency (required if method is specified)
requestParams.put("netWork", "TRC20"); // Chain network (if method is specified, it must be passed)
requestParams.put("orderVersion", "v1.0"); // Cashier version (v 1.0 and v 3.0 belong to the single mode version; v 2.0 and v 4.0 belong to the single mode version)
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); //Splicing parameters
}
String keyStr = stringBuilder.toString(); // Get the string to be encrypted
System.out.println("keyStr:" + keyStr);
String signedStr = JayaPayRequestUtil.privateEncrypt(keyStr, JayaPayRequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // Private key encryption
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = JayaPayRequestUtil.doPost(payUrl, postJson); //Send post json request
System.out.println("Response Msg:" + responseJson);
}
}
<?php
// platform public key, from Secret key config
$platPublicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiaKBgQCcEUIvQ/5L+SWbHOeR8VFeZvLbUk7V7OeEAQlQwIVLSZMTef3KtsOKKAsUYPf/aAcKRzZZXECODsPQiDPcdZvM/rFkgrFWkR7lPjTj5SiPxGaiK2Z2sne7A8aDF7fV/D7lfmEwNdZ7FWKVEB84/81BHnlGUwb5HpRTISG+boSO6wIDAQAB';
// mchchant private key
$mchPrivateKey = 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMigm7rtWnTeNagwFzGTH+Uw1ypbiy7VhIoFJbgSYSSHdCaXWdT/l2+2fQlEYgAETVZ/IXB29MCnrf3O0dwRFXiipIbsm5zyqSLiS6cKXe8zN1/PlQWUbEt5wyWm0GADB/4bV6eu6gA7sGXmjQqrzfKZkcie3aK7+7ry1NFxTI51AgMBAAECgYEAklqXQAVlt1tiSQ7L3J425jp6u6uMHN4lkYmvuleuBbfKQ1yla3wIPLYjAF+iHeEFidOz0Rb19JRdmIkHDkJoJg2W27LvO6RdUwzgRnsuA3OuNz97w08B3aXXbPmB91nTFjKSlUsbh3IQWP71noxW+iKn844EW5hC5Gvn4L3quAECQQDrz1r0VKIbBSBB2aLuz1XyD/TBT2aRhvOKf0XtTRiQhNjtJxoQmvNbbhvUwj8an7HyCuihAbdbrC2ymFFyOSDZAkEA2c4Yudi48C6COrroi1cWgPlEFeGJXP/V1k5loZ1n2vstYAGPhAB4wUnFBLDvMqaBzWJt7MRkiazT8KnBQCDY/QJAMXpNlEyZwt+deBOpO0BnwSWV7mWxmMFfImU4D+WITPbC7aexsWBBxaJh1o93XCe715RwYTAR//stj3akSDoyaQJAa4FKuxC51/Nc3Fg9R+modeiTLqmv/3NXvPvdNjRXesLX1rduex0wfVdII9ShfEKrdxDKaT9W0NyzD+r6NAkCkQJBAMAnTgPYf0f7rh417GdoP7R7Nwi8KBKwPHlmfRukibOQlKt9xjqpsKJwglLn8pcnXbYbswXIdqzuBvIGAe3OWNg=';
// merchent ID from idntask, from User info
$merchantCode = 'YOUR MERCHANT ID';
$mchUserIid = '100001';
$payMoney = '1.000001';
$method = 'USDT';
$orderType = '1';
$orderNum = 'T'.date("YmdHis",time());
$dateTime = date("YmdHis",time());
$email = '[email protected]';
$phone = '082112345678';
$name = 'Neo';
$notifyUrl = 'http://example.com/callback';
$expiryPeriod = '1000';
$currency = 'USDT';
$netWork = 'TRC20';
$orderVersion = 'v1.0';
$params = array(
'merchantCode' => $merchantCode,
'orderType' => $orderType,
'mchUserIid' => $mchUserIid,
'method' => $method,
'orderNum' => $orderNum,
'payMoney' => $payMoney,
'name' => $name,
'email' => $email,
'phone' => $phone,
'notifyUrl' => $notifyUrl,
'dateTime' => $dateTime,
'expiryPeriod' => $expiryPeriod,
'currency' => $currency,
'netWork' => $netWork,
'orderVersion' => $orderVersion
);
ksort($params);
$params_str = '';
foreach ($params as $key => $val) {
$params_str = $params_str . $val;
}
$sign = pivate_key_encrypt($params_str, $mchPrivateKey);
$params['sign'] = $sign;
$params_string = json_encode($params);
$url = 'https://openapi.jayapayment.com/gateway/prepaidOrder';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($params_string))
);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
//execute post
$request = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($httpCode == 200)
{
$result = json_decode($request, true);
echo "platRespCode :". $result['platRespCode'] . "\n";
echo "platRespMessage :". $result['platRespMessage'] . "\n";
echo "mchUserIid :". $result['mchUserIid'] . "\n";
echo "platOrderNum :". $result['platOrderNum'] . "\n";
echo "orderNum :". $result['orderNum'] . "\n";
echo "method :". $result['method'] . "\n";
echo "name :". $result['name'] . "\n";
echo "email :". $result['email'] . "\n";
echo "vaNumber :". $result['vaNumber'] . "\n";
echo "payMoney :". $result['payMoney'] . "\n";
echo "payFee :". $result['payFee'] . "\n";
echo "currency :". $result['currency'] . "\n";
echo "netWork :". $result['netWork'] . "\n";
echo "orderVersion :". $result['orderVersion'] . "\n";
echo "platSign :". $result['platSign'] . "\n";
$decryptStr = public_key_decrypt($result['platSign'], $platPublicKey);
echo "decryptStr :". $decryptStr . "\n";
}
else {
echo $httpCode;
}
function pivate_key_encrypt($data, $pivate_key)
{
$pivate_key = '-----BEGIN PRIVATE KEY-----'."\n".$pivate_key."\n".'-----END PRIVATE KEY-----';
$pi_key = openssl_pkey_get_private($pivate_key);
$crypto = '';
foreach (str_split($data, 117) as $chunk) {
openssl_private_encrypt($chunk, $encryptData, $pi_key);
$crypto .= $encryptData;
}
return base64_encode($crypto);
}
function public_key_decrypt($data, $public_key)
{
$public_key = '-----BEGIN PUBLIC KEY-----'."\n".$public_key."\n".'-----END PUBLIC KEY-----';
$data = base64_decode($data);
$pu_key = openssl_pkey_get_public($public_key);
$crypto = '';
foreach (str_split($data, 128) as $chunk) {
openssl_public_decrypt($chunk, $decryptData, $pu_key);
$crypto .= $decryptData;
}
return $crypto;
}
2.Request address
We provide two collection and ordering modes, you can choose according to your own needs:
One is to obtain the wallet address through our cashier
The other is to directly request the API to obtain the wallet address
Cashier (Mode 1):
POST https://openapi.jayapayment.com/gateway/prepaidOrder
Api(Mode 2):
POST https://openapi.jayapayment.com/gateway/pay
3.Digital collection request parameters
parameter | type | required | description | example |
---|---|---|---|---|
merchantCode | string(32) | Y | Merchant ID, obtained from the merchant platform | S820211021094748000001 |
orderType | string(10) | Y | orderType | 1-Digital currency trading |
mchUserId | string(32) | Y | Merchant user ID (your unique user ID, please do not enter special characters, spaces, etc.) | 100001 |
method | string(16) | N | Payment method 1. If you need to specify a payment method, you can select one from the example payment method list on the right; 2. If you do not specify a payment method, you do not need to pass this parameter (only for cashiers mode), you can select a payment method on our checkout page API mode must be passed |
USDT BTC ETH TRX |
currency | string(20) | N | Digital currency currency (required if payment method is specified) | USDT |
netWork | string(100) | N | Chain network (required if payment method is specified) | TRC20 |
orderNum | string(64) | N | Merchant order number (must be passed when there is an order, not when there is no order) | TEST123456789 |
payMoney | int(10) | Y | Payment amount(maximum 6 decimal places allowed) | 1.000001 |
notifyUrl | string(164) | Y | Order payment success asynchronous notification address (used to receive notifications after the order transaction is successful) | https://host:port/notifyUrl |
dateTime | string(32) | Y | timestamp format:yyyyMMddHHmmss | 20190101235959 |
expiryPeriod | int(5) | Y | Order expiration time (unit: minutes) | 720 |
name | string(64) | Y | client's name | Jack |
string(64) | Y | User email | [email protected] | |
phone | string(14) | Y | User mobile phone number | 081234567890 |
orderVersion | string(20) | N | The cashier mode must be passed API mode is not passed The cashier version (v1.0 and v3.0 belong to the single mode version; v2.0 and v4.0 belong to the single mode version) |
v1.0 |
sign | string(255) | Y | signature | fnbSOvY83pr8hXg+FdNNYi2ubQUGNv/qGYc4TjRl+XxO2jo92dyjKHFU9/4hNECilMooOcH |
4.Request message example
{
"merchantCode": "S82024547076582341",
"orderType": "1",
"mchUserId": "10001",
"method": "USDT",
"currency": "USDT",
"netWork": "TRC20",
"orderNum": "T1346856312",
"payMoney": "1.00000001",
"notifyUrl": "your notify url",
"dateTime": "2022-01-01 10:55:00",
"expiryPeriod": "1440",
"name": "JackMa",
"email": "[email protected]",
"phone": "08123456789",
"sign": "252534+FdNNYi2ubQUGNv/3534535+56546"
}
5.response parameters
parameter | type | required | description | example |
---|---|---|---|---|
platRespCode | String | Y | Whether the requested business was successful | FAIL:failure\SUCCESS:success |
platRespMessage | String | Y | Interface response information prompt | Request Transaction Success |
mchUserId | String | Y | Merchant User ID | 10001 |
platOrderNum | String | Y | Platform order number | PI1453242857400963072 |
orderNum | String | Y | Merchant order number | 23645782 |
currency | String | Y | Currency | USDT |
netWork | String | Y | chain network | TRC20 |
payMoney | string | Y | Payment amount | 1.00000001 |
url | String | Y | In cashier mode, return to the cashier link | Returned when 'platRespCode' is 'SUCCESS' |
inAddress | String | Y | In API mode, return wallet address | Returned when 'platRespCode' is 'SUCCESS' |
6.Example of successful response message
{
"platRespCode": "SUCCESS",
"url": "https://openapi.jayapayment.com/cashier?orderNum=PRE1626161123977859130123",
"mchUserId": "10001",
"platOrderNum": "PRE16263464579134560",
"payMoney": "1.00000000",
"currency": "USDT",
"netWork": "TRC20",
"platSign": "U79dat+657456fFt6Sqmf85GCP7V5JwW1arIUwUjlGkCs3TtvHfpDVaMi2fl+cfNGYSrCOZfursVwjiwJmka+44FyaGrrEOE9tKwODiZo/2534634/y61g0D9pzH17IVcr7Mc8BrweO7X4Pw==",
"platRespMessage": "Request Transaction Success"
}
Failure response message example
{
"platRespCode": "FAIL",
"platRespMessage": "the orderNum already exists"
}
7.Digital collection asynchronous notification
Please note: The current business will only receive callback notifications when the order payment is successful.
When verifying the signature, you must use the Platform Public Key
provided in Merchant Backstage - Collection and Payment Configuration-API Configuration
for decryption! ! !
There are two special situations in digital currency: no order mode and the payment amount does not match the order amount. For this reason, we have adjusted the asynchronous notification as follows:
1.If it is the above special situation, we will generate a new successful order for notification. You need to verify based on the notification information and generate a new order.;
2.Check whether the order exists in your system according to the notified merchant order number (order Num). It is recommended that you also store our platform order number (plat Order Num) when the order is successfully placed and do a two-step verification;
3.Judge according to the parameter special Status of the notification (0-default, 1-special status). If it is 1, it is judged to be the above special situation..
After JayaPay results are notified asynchronously, you need to respond with the SUCCESS
string
Otherwise Jaya Pay will continue to initiate 5 notifications to the downstream
import com.google.gson.JsonObject;
public class JayaPayNotify {
// Test account
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
public static void main(String[] args) throws Exception {
JsonObject notifyBody = new jsonObject();
boolean verifyResult = JayaPayRequestUtil.verifySign(notifyBody,PLAT_PUBLIC_KEY);
if (verifyResult) {
// ... The signature verification is passed and normal business logic is processed.
} else {
// ... Signature verification error
}
}
}
<?php
$res = json_decode(file_get_contents('php://input'), true);
$platSign = $res['platSign'];
unset($res['platSign']);
$public_key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFJ/AmUV4Z8udG8aOBUt/kEwc/DbxF5Gtfw6Y00NHQ4Pz2X2x9IxjUZxn2dnFxmrmhqKNlfwXOqyejhBzi0pSHyGoI4XP9IEfZGO6YkSb9DCY1ZxX8fDl2G+tPCbWYTVO4JutFmzTWgk1Uhhu6L9dlOMUHvZf3/6czA/a9C7azXwIDAQAB';
$decryptSign = public_key_decrypt($platSign, $public_key);
$params = $res;
ksort($params);
$params_str = '';
foreach ($params as $key => $val) {
$params_str = $params_str . $val;
}
if($params_str == $decryptSign) {
if($res['code'] == '00') {
echo 'success';
}
else {
echo 'fail';
}
}
else {
echo 'fail';
}
function public_key_decrypt($data, $public_key)
{
$public_key = '-----BEGIN PUBLIC KEY-----'."\n".$public_key."\n".'-----END PUBLIC KEY-----';
$data = base64_decode($data);
$pu_key = openssl_pkey_get_public($public_key);
$crypto = '';
foreach (str_split($data, 128) as $chunk) {
openssl_public_decrypt($chunk, $decryptData, $pu_key);
$crypto .= $decryptData;
}
return $crypto;
}
parameter | description | example |
---|---|---|
code | response status | 00 |
msg | response message | SUCCESS |
mchUserId | Merchant User ID | 10001 |
platOrderNum | Platform order number | BK_1563278763273 |
orderNum | Merchant order number | T1231511321515 |
method | payment method | USDT |
currency | Currency | USDT |
netWork | chain network | TRC20 |
status | payment result | INIT_ORDER: Order initialization NO_PAY: Not paid SUCCESS: Payment successful PAY_CANCEL: Cancellation PAY_ERROR: Payment failed |
payMoney | Collection amount | 100000 |
payFee | handling fee | 500 |
customer email | [email protected] | |
hashCode | transaction hash | 5e5c356af0ewrhgnf3d757h8a6a5506cc66354620 |
sendAddress | sending address | TDBbbeAB32WE576DVGE82GEC5BhsZs4 |
specialStatus | Special status (0-default, 1-special status) | 0 |
platSign | Platform signature | ja6R8eukQY9jc8z |
8.Asynchronous notification message example
{
"code": "00",
"msg": "SUCCESS",
"mchUserId": "100001",
"platOrderNum": "BCA1483771634191044608",
"orderNum": "T1642593166888",
"method": "USDT",
"currency": "USDT",
"netWork": "TRC20",
"status": "SUCCESS",
"payMoney": "1.0000001",
"payFee": "0.000016",
"email": "[email protected]",
"phone": "08123456789",
"hashCode": "5e5c356af0ewrhgnf3d757h8a6a5506cc66354620",
"sendAddress": "TDBbbeAB32WE576DVGE82GEC5BhsZs4",
"specialStatus": "0",
"platSign": "ja6R8eukQY9jc8zrhtf34654ungj7u8sdgdfjfs"
}
(6)Place an order with legal currency payment
1.code example
The code example is for reference only. For specific parameter descriptions, please refer to Request Parameter Description
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.Map;
import java.util.TreeMap;
public class JayaPayDemo {
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String cashUrl = "https://openapi.jayapayment.com/gateway/cash";
private static final String cashNotify = "http://host:port/notify";
public static void main(String[] args) throws Exception {
cash();
}
private static void cash() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("orderNum", "186888188666"); // Merchant order number
requestParams.put("method", "Transfer"); // Payment method (Transfer)
requestParams.put("orderType", "0"); // Order type (0-fiat currency transaction, 1-digital currency transaction)
requestParams.put("money", "125"); // Order amount, does not support decimal places
requestParams.put("feeType", "0"); // Handling fee type (0-on-account deduction, 1-off-account deduction)
requestParams.put("dateTime", "20200101235959");// Timestamp format yyyyMMddHHmmss
requestParams.put("number", "2021071209403321313122"); // Customer bank card number
requestParams.put("bankCode", "014"); // Indonesian bank code: refer to Appendix I for payment
requestParams.put("name", "test cash name"); // client's name
requestParams.put("mobile", "082122965511"); // Customer mobile phone number
requestParams.put("email", "[email protected]"); // Customer email
requestParams.put("description", "test cash"); // description
requestParams.put("notifyUrl", cashNotify); // callback address
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); // Splicing parameters
}
String keyStr = stringBuilder.toString(); // Get the string to be encrypted
System.out.println("keyStr:" + keyStr);
String signedStr = JayaPayRequestUtil.privateEncrypt(keyStr, JayaPayRequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // Private key encryption
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = JayaPayRequestUtil.doPost(cashUrl, postJson); // Send post json request
System.out.println("Response Msg:" + responseJson);
boolean pass = JayaPayRequestUtil.verifySign(new Gson().fromJson(responseJson, JsonObject.class), PLAT_PUBLIC_KEY); // Signature verification
if (pass) {
// ... The signature verification passes and normal business logic is executed.
} else {
// ... Signature verification error
}
}
}
<?php
// platform public key, from Secret key config
$platPublicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiaKBgQCcEUIvQ/5L+SWbHOeR8VFeZvLbUk7V7OeEAQlQwIVLSZMTef3KtsOKKAsUYPf/aAcKRzZZXECODsPQiDPcdZvM/rFkgrFWkR7lPjTj5SiPxGaiK2Z2sne7A8aDF7fV/D7lfmEwNdZ7FWKVEB84/81BHnlGUwb5HpRTISG+boSO6wIDAQAB';
// mchchant private key
$mchPrivateKey = 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMigm7rtWnTeNagwFzGTH+Uw1ypbiy7VhIoFJbgSYSSHdCaXWdT/l2+2fQlEYgAETVZ/IXB29MCnrf3O0dwRFXiipIbsm5zyqSLiS6cKXe8zN1/PlQWUbEt5wyWm0GADB/4bV6eu6gA7sGXmjQqrzfKZkcie3aK7+7ry1NFxTI51AgMBAAECgYEAklqXQAVlt1tiSQ7L3J425jp6u6uMHN4lkYmvuleuBbfKQ1yla3wIPLYjAF+iHeEFidOz0Rb19JRdmIkHDkJoJg2W27LvO6RdUwzgRnsuA3OuNz97w08B3aXXbPmB91nTFjKSlUsbh3IQWP71noxW+iKn844EW5hC5Gvn4L3quAECQQDrz1r0VKIbBSBB2aLuz1XyD/TBT2aRhvOKf0XtTRiQhNjtJxoQmvNbbhvUwj8an7HyCuihAbdbrC2ymFFyOSDZAkEA2c4Yudi48C6COrroi1cWgPlEFeGJXP/V1k5loZ1n2vstYAGPhAB4wUnFBLDvMqaBzWJt7MRkiazT8KnBQCDY/QJAMXpNlEyZwt+deBOpO0BnwSWV7mWxmMFfImU4D+WITPbC7aexsWBBxaJh1o93XCe715RwYTAR//stj3akSDoyaQJAa4FKuxC51/Nc3Fg9R+modeiTLqmv/3NXvPvdNjRXesLX1rduex0wfVdII9ShfEKrdxDKaT9W0NyzD+r6NAkCkQJBAMAnTgPYf0f7rh417GdoP7R7Nwi8KBKwPHlmfRukibOQlKt9xjqpsKJwglLn8pcnXbYbswXIdqzuBvIGAe3OWNg=';
// merchent ID from idntask, from User info
$merchantCode = 'YOUR MERCHANT ID';
// Merchant system unique order number
$orderNum = 'T'.date("YmdHis",time());
// Payment method
$method = 'Transfer';
$orderType = '0';
// withdraw money
$money = '20000';
// Handling fee type (0-on-account deduction, 1-off-account deduction)
$feeType = '1';
// timestamp format yyyymmddhhmmss
$dateTime = date("YmdHis",time());
// Customer bank card number
$number = '123456';
// Bank code (refer to the bottom of the document for details)
$bankCode = '014';
// Display name on bank confirmation display
$name = 'Neo';
// Customer's mobile number
$mobile = '082112345678';
// Customer's email address
$email = '[email protected]';
// The virtual account description
$description = 'Test Withdraw';
// url for callback
$notifyUrl = 'http://example.com/callback';
$params = array(
'merchantCode' => $merchantCode,
'orderType' => $orderType,
'method' => $method,
'orderNum' => $orderNum,
'money' => $money,
'feeType' => $feeType,
'dateTime' => $dateTime,
'number' => $number,
'bankCode' => $bankCode,
'name' => $name,
'mobile' => $mobile,
'email' => $email,
'notifyUrl' => $notifyUrl,
'description' => $description
);
ksort($params);
$params_str = '';
foreach ($params as $key => $val) {
$params_str = $params_str . $val;
}
$sign = pivate_key_encrypt($params_str, $mchPrivateKey);
$params['sign'] = $sign;
$params_string = json_encode($params);
$url = 'https://openapi.jayapayment.com/gateway/prepaidOrder';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($params_string))
);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
//execute post
$request = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($httpCode == 200)
{
$result = json_decode($request, true);
echo "platRespCode :". $result['platRespCode'] . "\n";
echo "platRespMessage :". $result['platRespMessage'] . "\n";
echo "platOrderNum :". $result['platOrderNum'] . "\n";
echo "orderNum :". $result['orderNum'] . "\n";
echo "status :". $result['status'] . "\n";
echo "statusMsg :". $result['statusMsg'] . "\n";
echo "money :". $result['money'] . "\n";
echo "fee :". $result['fee'] . "\n";
echo "feeType :". $result['feeType'] . "\n";
echo "bankCode :". $result['bankCode'] . "\n";
echo "number :". $result['number'] . "\n";
echo "name :". $result['name'] . "\n";
echo "description :". $result['description'] . "\n";
echo "platSign :". $result['platSign'] . "\n";
$decryptStr = public_key_decrypt($result['platSign'], $platPublicKey);
echo "decryptStr :". $decryptStr . "\n";
}
else {
echo $httpCode;
}
function pivate_key_encrypt($data, $pivate_key)
{
$pivate_key = '-----BEGIN PRIVATE KEY-----'."\n".$pivate_key."\n".'-----END PRIVATE KEY-----';
$pi_key = openssl_pkey_get_private($pivate_key);
$crypto = '';
foreach (str_split($data, 117) as $chunk) {
openssl_private_encrypt($chunk, $encryptData, $pi_key);
$crypto .= $encryptData;
}
return base64_encode($crypto);
}
function public_key_decrypt($data, $public_key)
{
$public_key = '-----BEGIN PUBLIC KEY-----'."\n".$public_key."\n".'-----END PUBLIC KEY-----';
$data = base64_decode($data);
$pu_key = openssl_pkey_get_public($public_key);
$crypto = '';
foreach (str_split($data, 128) as $chunk) {
openssl_public_decrypt($chunk, $decryptData, $pu_key);
$crypto .= $decryptData;
}
return $crypto;
}
2.Request address
POST https://openapi.jayapayment.com/gateway/cash
3.Request parameters
Parameters | Type | Required | Description | Example |
---|---|---|---|---|
merchantCode | Y | Merchant ID,Get it in Merchant Platform-Personal Center-Personal Information |
S820190712000002 | |
orderType | string(10) | Y | Order Type | 0-Fiat currency trading |
method | string(10) | Y | payment method | Transfer |
orderNum | string(50) | Y | Merchant order number | 10000001 |
money | string(16) | Y | Payment amount (decimal points are not supported, please do not pass decimals) | 150000 |
feeType | String(1) | Y | Handling fee type | 0:Deducted from the payment amount, 1: handling fee is additional |
bankCode | string(32) | Y | Bank number | 014(Refer to Appendix II BankCode Directory) |
number | string(50) | Y | Customer bank card number | 12312431241 |
name | String(50) | Y | client's name | Jack |
mobile | string(14) | Y | User mobile phone number | 081234567890 |
string(64) | Y | User email | [email protected] | |
notifyUrl | string(164) | Y | callback address | http://notify.com |
dateTime | string(14) | Y | timestamp format:yyyyMMddHHmmss | 20200101235959 |
description | string(255) | Y | Return by request parameters | Pay for the order |
sign | string | Y | sign one's name | Yg+ePvTFhiRrARcZKBcRG0l89rqisPIuZQStYqBIwSMPaqvqbc3dFevgS9jt |
4.Request message example
{
"merchantCode": "S820211021094748000001",
"orderType": "0",
"method": "Transfer",
"orderNum": "186888188666",
"money": "50000",
"feeType": "1",
"bankCode": "014",
"number": "2021071209403321313122",
"name": "test cash name",
"mobile": "082122965511",
"email": "[email protected]",
"notifyUrl": "your notify url",
"dateTime": "2021-07-12 09:41:00",
"description": "test cash",
"sign": "Yg+ePvTFhiRrARcZKBcRG0l89rqisPIuZQStYqBIwSMPaqwH77qRXI1J+jElOBpa"
}
5.response parameters
Parameters | Type | Required | Description | Example |
---|---|---|---|---|
platRespCode | String | Y | Whether the request service is successful | FAIL: Failure\SUCCESS: Success |
platRespMessage | String | Y | Interface response information prompt | Request successful |
platOrderNum | String | Y | Platform order number | PI1453242857400963072 |
orderNum | String | Y | Merchant order number | 23645782 |
status | int | Y | Order status | 0-pending 1-processing 2-payment successful 4-payment failed 5-bank payment in progress |
statusMsg | String | Y | Order status information | Apply |
money | string | Y | payment amount | 150000 |
fee | String | Y | Fee amount | 12.25 |
feeType | String | Y | Handling fee type | 0: Deducted within the order, 1: Handling fee is additional |
bankCode | String | N | Bank number | 014 (refer to Appendix II BankCode section) |
number | String | Y | Customer bank card number | 12312431241 |
name | String | Y | Customer name | Jack |
description | String | Y | Return according to request parameters | Place payment order |
platSign | String | Y | Signature | PI1453242857400963072 |
6.Example of payment response message
{
"platRespCode": "SUCCESS",
"platRespMessage": "Request success",
"platOrderNum": "W0620220119174331000001",
"orderNum": "186888188666",
"status": 0,
"statusMsg": "Apply",
"money": "50000",
"fee": "7",
"feeType": "0",
"bankCode": "014",
"number": "2021071209403321313122",
"name": "test cash name",
"description": "test cash",
"platSign": "E5uNF7B9NXyhtlRo2I7/KVHN4Sbz0c3VbwCLpH3vjUpv6Cai+bmJA/Q8dVE2RJRe1+dsbzg=="
}
7. Pay asynchronous notification on behalf of others
When verifying the signature, you must use the Platform Public Key
provided in Merchant Backstage - Collection and Payment Configuration-API Configuration
for decryption! ! !
After JayaPay results are notified asynchronously, you need to respond with the SUCCESS
string
Otherwise, JayaPay will continue to send 5 notifications to the downstream.
Parameters | Description | Example |
---|---|---|
platOrderNum | Platform order number | BK_1563278763273 |
orderNum | Merchant order number | T1231511321515 |
money | payment amount | 100000 (decimal points are not supported) |
feeType | Order result status | Handling fee type, 0: Deducted within the order 1: Handling fee is additional |
fee | handling fee | 500 |
name | customer name | Neo |
number | Customer bank card number | 45649849659456 |
bankCode | Receipt bank | 014 (refer to Appendix II BankCode section) |
status | Order status | 0-pending 1-processing 2-payment successful 4-payment failed 5-bank payment in progress |
statusMsg | Order status description | Payout Success |
description | Order description | Merchant uploads and returns as is |
platSign | Platform signature | ja6R8eukQY9jc8... |
8.Asynchronous notification message example
{
"platOrderNum": "W0620220119174331000001",
"orderNum": "186888188666",
"money": "50000",
"fee": "7",
"feeType": "0",
"name": "test cash name",
"number": "2021071209403321313122",
"bankCode": "014",
"status": "2",
"statusMsg": "SUCCESS",
"description": "test cash",
"platSign": "LGEpz2LjbZ6Iyvn+zLc/+t26AaH0aEhHVD62lSCdo6XIkAg86AUncCvmym62wVoE3r2+dHnv27qi/01UQDcqFK8DYioRCcydYSjB4QRVezG3fcZlhWrACmWGacnXkE7p5zChL7pK5h0HuBhbo1zKt4FunQR6QMmcBVfv7YfB3W0"
}
(7)Digital payment ordering
Payment orders support legal currency and digital currency (USDT/BTC/ETH/TRX) transactions. If you want to use digital currency transactions, please set order Type=1 and pass in the corresponding currency Currency and network net Work When using digital currency for transactions, the currency and chain network are must-have items You need to tell us which digital currency and chain network (TRC 20/BEP 20/OMNI/ERC 20/TRX) you want to use for trading When using digital currency for transactions, you need to pass in your inAddress to receive the digital currency. We will launch transactions in other currencies and networks in the future, so stay tuned
1.code example
The code example is for reference only, please refer to the specific parameter description.Request parameter description
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.Map;
import java.util.TreeMap;
public class JayaPayDemo {
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String cashUrl = "https://openapi.jayapayment.com/gateway/cash";
private static final String cashNotify = "http://host:port/notify";
public static void main(String[] args) throws Exception {
cash();
}
private static void cash() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("orderType", "1");
requestParams.put("method", "USDT");
requestParams.put("orderNum", "186888188666");
requestParams.put("money", "1.000001");
requestParams.put("feeType", "1");
requestParams.put("dateTime", "20200101235959");
requestParams.put("name", "test cash name");
requestParams.put("mobile", "082122965511");
requestParams.put("email", "[email protected]");
requestParams.put("notifyUrl", cashNotify);
requestParams.put("currency", "USDT");
requestParams.put("netWork", "TRC20");
requestParams.put("inAddress", "zkif74bhvkf8934rgg6");
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); // Splicing parameters
}
String keyStr = stringBuilder.toString(); // Get the string to be encrypted
System.out.println("keyStr:" + keyStr);
String signedStr = JayaPayRequestUtil.privateEncrypt(keyStr, JayaPayRequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // Private key encryption
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = JayaPayRequestUtil.doPost(cashUrl, postJson); // Send post json request
System.out.println("Response Msg:" + responseJson);
boolean pass = JayaPayRequestUtil.verifySign(new Gson().fromJson(responseJson, JsonObject.class), PLAT_PUBLIC_KEY); // Signature verification
if (pass) {
// ... The signature verification passes and normal business logic is executed.
} else {
// ... Signature verification error
}
}
}
2.Request address
POST https://openapi.jayapayment.com/gateway/cash
3.Request parameters
parameter | type | required | description | example |
---|---|---|---|---|
merchantCode | Y | Merchant ID,Get it in Merchant Platform-Personal Center-Personal Information |
S820190712000002 | |
orderType | string(10) | Y | Order Type | 1-Digital currency trading |
method | string(16) | Y | payment method | USDT BTC ETH TRX |
orderNum | string(50) | Y | Merchant order number | 186888188666 |
money | string(32,8) | Y | Payment amount | 1.000001(Supports up to 6 decimal places) If the fee Type is 0, because there is a handling fee, please place the order with the amount to 3 decimal places first. |
feeType | String(1) | Y | Handling fee type | 0: Deducted from the payment amount 1: Additional handling fee |
name | String(50) | Y | client's name | Jack |
mobile | string(14) | Y | User mobile phone number | 081234567890 |
string(64) | Y | User email | [email protected] | |
notifyUrl | string(164) | Y | callback address | https://***.com |
dateTime | string(32) | Y | timestampFormat:yyyyMMddHHmmss | 20200101235959 |
currency | string(20) | Y | digitalCurrencyCurrency | USDT |
netWork | string(100) | Y | chainNetwork | TRC20 |
inAddress | string | Y | depositAddress | vboj3457vbiae5y35y |
4.requestMessageExample
{
"merchantCode": "S820211021094748000001",
"orderType": "1",
"method": "USDT",
"orderNum": "186888188666",
"money": "1.00000001",
"feeType": "1",
"name": "test cash name",
"mobile": "082122965511",
"email": "[email protected]",
"notifyUrl": "your notify url",
"dateTime": "2021-07-12 09:41:00",
"currency": "USDT",
"netWork": "TRC20",
"inAddress": "vboj3457vbiae5y35y",
"sign": "Yg+ePvTFhiRrARcZKBcRG0l89rqisPIuZQStYqBIwSMPaqwH77qRXI1J+jElOBpa"
}
5.responseParameters
parameter | type | description | example |
---|---|---|---|
platRespCode | String | Whether the request service is successful | FAIL: Failure\SUCCESS: Success |
platRespMessage | String | Interface response information prompt | Request successful |
platOrderNum | String | Platform order number | PI1453242857400963072 |
status | String | Order Status | 0 |
statusMsg | String | Order status information | Apply |
orderNum | String | Merchant order number | 23645782 |
money | string | Payment amount | 1.00000001 |
fee | String | Handling fee amount | 12.25 |
feeType | String | Handling fee type | 0:Deducted from the payment amount 1: Handling fee is additional |
name | String | client's name | Jack |
currency | string | Digital currency currency | USDT |
netWork | string | chain network | TRC20 |
platSign | String | signature | PI1453242857400963072 |
6.Response message example
{
"platRespCode": "SUCCESS",
"platRespMessage": "Request success",
"platOrderNum": "W0620220119174331000001",
"orderNum": "186888188666",
"status": "0",
"statusMsg": "Apply",
"money": "1.00000001",
"fee": "7",
"feeType": "1",
"currency": "USDT",
"netWork": "TRC20",
"platSign": "E5uNF7B9NXyhtlRo2I7/KVHN4Sbz0c3VbwCLpH3vjUpv6Cai+bmJA/Q8dVE2RJRe1+dsbzg=="
}
7.Digital payment asynchronous notification
After receiving the result asynchronous notification, you need to respond with the SUCCESS
string, which does not contain quotes and is not in Json format.。
Otherwise Jaya Pay will continue to initiate 5 notifications to the downstream.
parameter | description | example |
---|---|---|
platOrderNum | Platform order number | BK_1563278763273 |
orderNum | Merchant order number | T1231511321515 |
money | Payment amount | 1.000001(Supports up to 6 decimal places) |
feeType | Order result status | Handling fee type, 0: Deducted from the payment amount, 1: Handling fee is additional |
fee | handling fee | 500 |
currency | Currency | USDT |
netWork | chain network | TRC20 |
name | client's name | Neo |
status | Order Status | 0-pending 1-processing 2-payment successful 4-payment failed 5-bank payment in progress |
statusMsg | Order status description | Payout Success |
hashCode | transaction hash | 5e5c356af0ewrhgnf3d757h8a6a5506cc66354620 |
inAddress | receiving address | TDBbbeAB32WE576DVGE82GEC5BhsZs4 |
sendAddress | sending address | TDBbbeAB32WE576DVGE82GEC5BhsZs4 |
platSign | Platform signature | ja6R8eukQY9jc8... |
8.Asynchronous notification message example
{
"platOrderNum": "W0620220119174331000001",
"orderNum": "186888188666",
"money": "1.00000001",
"fee": "0.0001",
"feeType": "1",
"currency": "USDT",
"netWork": "TRC20",
"name": "test cash name",
"status": "2",
"statusMsg": "SUCCESS",
"hashCode": "5e5c356af0ewrhgnf3d757h8a6a5506cc66354620",
"inAddress": "Twrgtehsd576gsdre876d2545C5Br23324",
"sendAddress": "TDBbbeAB32WE576DVGE82GEC5BhsZs4",
"platSign": "LGEpz2LjbZ6Iyvn+zLc/+t26AaH0aEhHVD62lSCdo6XIkAg86AUncCvmym62wVoE3r2+dHnv27qi/01UQDcqFK8DYioRCcydYSjB4QRVezG3fcZlhWrACmWGacnXkE7p5zChL7pK5h0HuBhbo1zKt4FunQR6QMmcBVfv7YfB3W0"
}
(8)Order Tracking
1.Order Tracking
import com.google.gson.JsonObject;
public class OrderQuery {
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String orderQueryUrl = "https://openapi.jayapayment.com/gateway/query";
public static void main(String[] args) throws Exception {
query();
}
private static void query() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("queryType", "CASH_QUERY"); // payment channel
requestParams.put("orderNum", "186888188666"); // Merchant order number
requestParams.put("platOrderNum", "PRE186888188666"); // Platform order number
requestParams.put("dateTime", "20220101105500");// Timestamp format yyyyMMddHHmmss
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); // Splicing parameters
}
String keyStr = stringBuilder.toString(); // Get the string to be encrypted
System.out.println("keyStr:" + keyStr);
String signedStr = JayaPayRequestUtil.privateEncrypt(keyStr, JayaPayRequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // Private key encryption
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = JayaPayRequestUtil.doPost(orderQueryUrl, postJson); //Send post json request
System.out.println("Response Msg:" + responseJson);
}
}
Request address
POST https://openapi.jayapayment.com/gateway/query
Note: One of the merchant order number and the platform order number must be passed, or they can be passed at the same time.
Request parameters
parameter | required | type | description | Example |
---|---|---|---|---|
merchantCode | Y | string(32) | Merchant ID,Get it in Merchant Platform-Personal Center-Personal Information |
S820190712000002 |
queryType | Y | string(16) | Query type | Collect order:ORDER_QUERY Pay on behalf:CASH_QUERY |
orderNum | Y | string(64) | Merchant order number | T1231511321515 |
platOrderNum | Y | string(64) | Platform order number | PRE1234567890 |
dateTime | Y | string(18) | timestamp | 20191018105510 yyyy-MM-dd HH:mm:ss |
sign | Y | string | RSA signature | ja6R8eukQ... |
responseParameters
parameter | type | required | description | give typical examples |
---|---|---|---|---|
success | BOOLEAN | Y | Interface response | true/false |
code | int | Y | Interface response code | 1000It means the query is successful, and the others are query failures. |
message | String | Y | Interface response information | Return specific response information |
data | Json | Y | Interface response parameters | The following parameters are returned in data, or null if failed |
msg | String | Y | Order status details | Request Transaction Success |
platOrderNum | String | Y | Platform order number | PI1453242857400963072 |
amount | String | Y | Payment amount | 1500 |
fee | string | Y | Handling fee amount | 5 |
orderNum | String | Y | Merchant order number | 23645782 |
inAddress | string | N | Deposit address | TLRx8JXsDidC7PYVLmeD6Bhk5k5CUjnPV3 |
sendAddress | String | N | Billing address | TLRx8JcxDidC7PYVLmeD6Bhk5k5CUjnPV3 |
platRespCode | String | Y | Whether the requested business was successful | FAIL:failure\SUCCESS:success |
platRespMessage | String | Y | Interface response information prompt | Request Transaction Success |
status | int/String | Y | Order Status | The collection status returns string type, and the payment status returns int type. |
2.Request message example
{
"dateTime": "20220101105500",
"merchantCode": "S820211021094748000001",
"orderNum": "T1642593166888",
"platOrderNum": "PRE1642593166888",
"queryType": "ORDER_QUERY",
"sign": "lGw1OJcuUL0MGaIq44U2u2bFM5dalJJuT/G6mQWbIBT9dmVAJaLwR125emPDXYYSdnOtNxja86A2VJJLf40BCg2HevHolebvt2ay3ukCQaUhwNkIGz4KF0Ud+XMUA36LoFTWZbDYv9y8vgCnWxwZFKj7ePrfLxc+TA7jpqv65lQ\u003d"
}
3.Example of response message for collection order inquiry
{
"success": true,
"code": 1000,
"message": "Success",
"data": {
"msg": "Payment Success",
"platOrderNum": "BCA1483771634191044608",
"amount": "150",
"fee": "16",
"orderNum": "T1642593166888",
"platRespCode": "SUCCESS",
"platRespMessage": "success",
"status": "SUCCESS"
}
}
4.Example of payment order query response message
{
"success": true,
"code": 1000,
"message": "Success",
"data": {
"msg": "test cash",
"platOrderNum": "W0620220119174331000001",
"amount": "125",
"fee": "7",
"orderNum": "186888188666",
"platRespCode": "SUCCESS",
"platRespMessage": "success",
"status": 2
}
}
(9)Bank account inquiry
1.Bank account inquiry
import com.google.gson.JsonObject;
public class OrderQuery {
private static final String MCH_ID = "S820211021094748000001";
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String orderQueryUrl = "https://openapi.jayapayment.com/gateway/verify";
public static void main(String[] args) throws Exception {
query();
}
private static void query() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("bankCode", "014"); // Bank code (refer to the bank code list at the end of the document)
requestParams.put("accountNumber", "08123456789"); // Bank card number
requestParams.put("dateTime", "20220101105500");// Timestamp format yyyyMMddHHmmss
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); // Splicing parameters
}
String keyStr = stringBuilder.toString(); // Get the string to be encrypted
System.out.println("keyStr:" + keyStr);
String signedStr = JayaPayRequestUtil.privateEncrypt(keyStr, JayaPayRequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // Private key encryption
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = JayaPayRequestUtil.doPost(orderQueryUrl, postJson); // Send post json request
System.out.println("Response Msg:" + responseJson);
}
}
Request address
POST https://openapi.jayapayment.com/gateway/verify
Note: The accuracy of the account verification interface is not completely accurate and there is a certain error. Failure in verification does not necessarily mean that the account is unavailable. Please use it with caution! ! !
Request parameters
parameter | type | description | example |
---|---|---|---|
merchantCode | string(32) | Y | Merchant ID,Get it in Merchant Platform-Personal Center-Personal Information |
bankCode | string(32) | Bank code (refer to the bank code list at the end of the document) | 014 |
accountNumber | string(50) | Bank card number | 08123456789 |
dateTime | string(18) | timestamp | 20220101105500 yyyy-MM-dd HH:mm:ss |
sign | string | RSA signature | ja6R8eukQ... |
response parameters
parameter | type | required | description | example |
---|---|---|---|---|
platRespCode | String | Y | Whether the requested business was successful | FAIL:failure\SUCCESS:success |
platRespMessage | String | Y | Interface response information prompt | Request Transaction Success |
accountName | String | Y | account name | OKTAVIANE KAEMPE |
2.Request message example
{
"dateTime": "20220101105500",
"bankCode": "014",
"merchantCode": "S820211021094748000001",
"sign": "X/o+IQUzLJqYe9Feid9Uww72mJGOvhJS9dps+EBO7oSWh1P4gboeIfGjVggYViuYsFgYgYR/DZGJEIfo1EUChrZyVZnzGHtd61QhOqRmXCtAwfMGlDgBerEGEl6/JMKmcJbFEjxxJf8fl9HzVUp0T+Q6W5kR/9yWPT7Aask7V7k=",
"accountNumber": "08123456789"
}
3.Response message example
{
"accountName": "OKTAVIANE KAEMPE",
"platRespCode": "SUCCESS",
"platRespMessage": "SUCCESS"
}
(10)Account balance inquiry
1.Account balance inquiry
import com.google.gson.JsonObject;
public class OrderQuery {
private static final String MCH_ID = "S820211021094748000001"; // Merchant ID
private static final String PLAT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2JoMfFqLsSJjAiCahEnlP3aRj8yCT+WHzR+VvPBTw9S1i7iYWb+MY09CG/HYuHF4+IxshXDJygmndxKf/esuwPybS8mAd//yubHpmZsmBqg1FffT8VH1APa6ZRWASUp4U01ZrbCCp35QA8FuWrJGMJxGx4xk7KUtV2yujxC8noQIDAQAB"; // 平台公钥
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String orderQueryUrl = "https://openapi.jayapayment.com/gateway/interface/getBalance";
public static void main(String[] args) throws Exception {
query();
}
private static void query() throws Exception {
Map<String, String> requestParams = new TreeMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("currency", "IDR"); // currency(IDR)
StringBuilder stringBuilder = new StringBuilder();
for (String key : requestParams.keySet()) {
stringBuilder.append(requestParams.get(key)); // Splicing parameters
}
String keyStr = stringBuilder.toString(); // Get the string to be encrypted
System.out.println("keyStr:" + keyStr);
String signedStr = RequestUtil.privateEncrypt(keyStr, RequestUtil.getPrivateKey(MCH_PRIVATE_KEY)); // Private key encryption
requestParams.put("sign", signedStr);
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = RequestUtil.doPost(orderQueryUrl, postJson); // Send post json request
System.out.println("Response Msg:" + responseJson);
}
}
Request address
POST https://openapi.jayapayment.com/gateway/interface/getBalance
Request parameters
parameter | required | description | description | example |
---|---|---|---|---|
merchantCode | Y | string(32) | Merchant ID,Get it in Merchant Platform-Personal Center-Personal Information |
S820211021094748000001 |
currency | N | string(20) | Currency | IDR(Display balances in all currency units without transmitting) |
sign | Y | string | RSA signature | ja6R8eukQ... |
Response parameters
parameter | type | required | description | example |
---|---|---|---|---|
success | BOOLEAN | Y | Interface response | true/false |
code | int | Y | Interface response code | 1000 means the query is successful, the others are query failures. |
message | String | Y | Interface response information | Return specific response information |
data | Json | Y | Interface response parameters | The following parameters are returned in data, or null if failed |
mchId | String | Y | Merchant ID | S8202110212321300001 |
mchName | String | Y | Business Name | test |
mchNo | String | Y | Merchant number | TP123 |
currency | string | Y | Currency | IDR |
balance | String | Y | Available Balance | 1000.00 |
freeze | String | Y | Freeze balance | 10.00 |
waitingSettleAmount | String | Y | Amount to be settled | 200.00 |
freezeWaitingSettleAmount | String | Y | Freeze the amount pending settlement | 100.00 |
totalAmount | String | Y | full amount | 20000.00 |
2.Request message example
{
"merchantCode": "S8202110212321300001",
"currency": "IDR",
"sign": "X/o+IQUzLJqYe9Feid9Uww72mJGOvhJSJEIfo1EUChrZyVZnzGHtd61QhOqRmXCtAwk7V7k="
}
3.Response message example
{
"success": true,
"code": 1000,
"message": "SUCCESS",
"data": [
{
"mchId": "S82022091232130000001",
"mchName": "test",
"mchNo": "test",
"country": "INDONESIA",
"currency": "IDR",
"balance": "1000000.01",
"freeze": "10.00",
"waitingSettleAmount": "10.00",
"freezeWaitingSettleAmount": "20.00",
"totalAmount": "1000040.01"
}
]
}
(11)Optional parameter appendix
Ⅰ Collection business
1 Status parameter
field value | illustrate |
---|---|
INIT_ORDER | Order initialization |
NO_PAY | unpaid |
SUCCESS | payment order initialization |
PAY_CANCEL | revoke |
PAY_ERROR | Payment failed |
Ⅱ Payment service
1 Status parameter
field value | illustrate |
---|---|
0 | pending |
1 | accepted |
2 | successful payment |
4 | Payment failed |
5 | bank payment in progress |
2 BankCode parameter
BANK CODE | BANK ABBREVIATION | Bank name |
---|---|---|
116 | ACEH | Bank Aceh Syariah |
1160 | ACEH_UUS | Bank Agris UUS |
945 | AGRIS | Bank IBK Indonesia |
494 | AGRONIAGA | Bank Agroniaga |
466 | ANDARA | Bank Andara |
531 | ANGLOMAS | Anglomas International Bank |
061 | ANZ | Bank ANZ Indonesia |
020 | ARTA_NIAGA_KENCANA | Bank Arta Niaga Kencana |
037 | ARTHA | Bank Artha Graha Internasional |
542 | ARTOS | Bank ARTOS/ Bank Jago |
129 | BALI | BPD Bali |
459 | BISNIS_INTERNASIONAL | Bank Bisnis Internasional |
040 | BANGKOK | Bangkok Bank |
558 | BANTEN | BPD Banten |
014 | BCA | Bank Central Asia(BCA) |
536 | BCA_SYR | Bank Central Asia (BCA) Syariah |
133 | BENGKULU | Bank Bengkulu |
110 | BJB | Bank Jawa Barat(BJB) |
425 | BJB_SYR | Bank BJB Syariah |
009 | BNI | Bank Negara Indonesia(BNI) |
427 | BNI_SYR | Bank BNI Syariah |
069 | BOC | BANK OF CHINA LIMITED |
002 | BRI | Bank Rakyat Indonesia(BRI) |
422 | BRI_SYR | Bank BRI Syariah |
1450 | BNP_PARIBAS | Bank BNP Paribas |
4510 | BSI | Bank Syariah Indonesia(BSI) |
200 | BTN | Bank Tabungan Negara (BTN) |
2000 | BTN_UUS | Bank Tabungan Negara (BTN) UUS |
213 | BTPN | Bank BTPN |
5470 | BTPN_SYARIAH | BTPN Syariah |
547 | BTPN_SYR | Bank BTPN Syariah |
441 | BUKOPIN | Wokee/Bukopin |
521 | BUKOPIN_SYR | Bank Bukopin Syariah |
076 | BUMI_ARTA | Bank Bumi Arta |
054 | CAPITAL | Bank Capital Indonesia |
949 | CHINATRUST | CTBC Indonesia |
559 | CNB | Centratama Nasional Bank(CNB) |
022 | CIMB | Bank CIMB Niaga |
0220 | CIMB_UUS | Bank CIMB Niaga UUS |
031 | CITIBANK | Citibank |
950 | COMMONWEALTH | Bank Commonwealth |
112 | BPD_DIY | BPD DIY |
011 | DANAMON | Bank Danamon |
0110 | DANAMON_UUS | Bank Danamon UUS |
046 | DBS | Bank DBS Indonesia |
526 | DINAR_INDONESIA | Bank Dinar Indonesia |
111 | DKI | Bank DKI |
778 | DKI_UUS | Bank DKI UUS |
562 | FAMA | Bank Fama International |
699 | EKA | Bank EKA |
161 | GANESHA | Bank Ganesha |
484 | HANA | LINE Bank/KEB Hana |
567 | HARDA_INTERNASIONAL | Allo Bank/Bank Harda Internasional |
2120 | HIMPUNAN_SAUDARA | Bank Himpunan Saudara 1906 |
041 | HSBC | HSBC |
164 | ICBC | Bank ICBC Indonesia |
513 | INA_PERDANA | Bank Ina Perdana |
555 | INDEX_SELINDO | Bank Index Selindo |
146 | INDIA | Bank of India Indonesia |
115 | JAMBI | Bank Jambi |
472 | JASA_JAKARTA | Bank Jasa Jakarta |
113 | JAWA_TENGAH | Bank Jateng |
114 | JATIM | Bank Jatim |
095 | JTRUST | Bank JTrust Indonesia |
123 | KALIMANTAN_BARAT | BPD Kalimantan Barat/Kalbar |
1230 | KALIMANTAN_BARAT_UUS | BPD Kalimantan Barat UUS |
122 | KALIMANTAN_SELATAN | BPD Kalimantan Selatan/Kalsel |
1220 | KALIMANTAN_SELATAN_UUS | BPD Kalimantan Selatan UUS |
125 | KALIMANTAN_TENGAH | BPD Kalimantan Tengah (Kalteng) |
124 | KALIMANTAN_TIMUR | BPD Kalimantan Timur |
1240 | KALIMANTAN_TIMUR_UUS | BPD Kalimantan Timur UUS |
535 | KESEJAHTERAAN_EKONOMI | Seabank/Bank Kesejahteraan Ekonomi(BKE) |
121 | LAMPUNG | BPD Lampung |
131 | MALUKU | Bank Maluku |
008 | MANDIRI | Bank Mandiri |
564 | MANTAP | Bank MANTAP |
548 | MULTI_ARTA_SENTOSA | Bank Multi Arta Sentosa(MAS) |
157 | MASPION | Bank Maspion Indonesia |
097 | MAYAPADA | Bank Mayapada |
016 | MAYBANK | Bank Maybank |
947 | MAYBANK_SYR | Bank Maybank Syariah Indonesia |
553 | MAYORA | Bank Mayora Indonesia |
426 | MEGA | Bank Mega |
506 | MEGA_SYR | Bank Mega Syariah |
151 | MESTIKA_DHARMA | Bank Mestika Dharma |
485 | MNC_INTERNASIONAL | Motion/Bank MNC Internasional |
147 | MUAMALAT | Bank Muamalat Indonesia |
491 | MITRA_NIAGA | Bank Mitra Niaga |
048 | MIZUHO | Bank Mizuho Indonesia |
503 | NATIONALNOBU | Bank National Nobu |
128 | NUSA_TENGGARA_BARAT | BPD Nusa Tenggara Barat(NTB) |
1280 | NUSA_TENGGARA_BARAT_UUS | BPD Nusa Tenggara Barat (NTB) UUS |
130 | NUSA_TENGGARA_TIMUR | BPD Nusa Tenggara Timur(NTT) |
145 | NUSANTARA_PARAHYANGAN | Bank Nusantara Parahyangan |
028 | OCBC | Bank OCBC NISP |
0280 | OCBC_UUS | Bank OCBC NISP UUS |
019 | PANIN | Bank Panin |
517 | PANIN_SYR | Panin Dubai Syariah |
132 | PAPUA | Bank Papua |
013 | PERMATA | Bank Permata |
0130 | PERMATA_UUS | Bank Permata UUS |
520 | PRIMA_MASTER | Bank Prima Master |
167 | QNB_KESAWAN | QNB KESAWAN |
1670 | QNB_INDONESIA | QNB Indonesia |
5260 | OKE | Bank Oke Indonesia |
089 | RABOBANK | Rabobank International Indonesia |
047 | RESONA | Bank Resona Perdania |
119 | RIAU_DAN_KEPRI | BPD Riau Dan Kepri |
1190 | RIAU_DAN_KEPRI_UUS | BPD Riau Dan Kepri UUS |
523 | SAHABAT_SAMPOERNA | Bank Sahabat Sampoerna |
498 | SBI_INDONESIA | Bank SBI Indonesia |
152 | SHINHAN | Bank Shinhan Indonesia |
153 | SINARMAS | Bank Sinarmas |
050 | STANDARD_CHARTERED | Standard Chartered Bank |
134 | SULAWESI | Bank Sulteng |
135 | SULAWESI_TENGGARA | Bank Sultra |
126 | SULSELBAR | Bank Sulselbar |
1260 | SULSELBAR_UUS | Bank Sulselbar UUS |
127 | SULUT | BPD Sulawesi Utara(SulutGo) |
118 | SUMATERA_BARAT | BPD Sumatera Barat |
1180 | SUMATERA_BARAT_UUS | BPD Sumatera Barat UUS |
120 | SUMSEL_DAN_BABEL | BPD Sumsel Babel |
1200 | SUMSEL_DAN_BABEL_UUS | Bank Sumsel Babel UUS |
117 | SUMUT | Bank Sumut |
1170 | SUMUT_UUS | Bank Sumut UUS |
1530 | SINARMAS_UUS | Bank Sinarmas UUS |
045 | MITSUI | Bank Sumitomo Mitsui Indonesia |
451 | MANDIRI_SYR | Bank Syariah Mandiri(BSM) |
042 | TOKYO | Bank of Tokyo |
023 | UOB | TMRW/Bank UOB Indonesia |
566 | VICTORIA_INTERNASIONAL | Bank Victoria International |
405 | VICTORIA_SYR | Bank Victoria Syariah |
212 | WOORI | Bank Woori Saudara |
490 | YUDHA_BHAKTI | Neo Commerce/Bank Yudha Bhakti(BNC) |
1120 | DAERAH_ISTIMEWA_UUS | BPD_Daerah_Istimewa_Yogyakarta_(DIY) |
5590 | CENTRATAMA | Bank Centratama |
088 | CCB | CCB Indonesia |
067 | DEUTSCHE | Deutsche Bank |
032 | JPMORGAN | JPMORGAN CHASE BANK |
5640 | MANDIRI_TASPEN | Bank Mandiri Taspen Pos |
501 | RBS | Royal Bank of Scotland (RBS) |
10001 | OVO | OVO |
10002 | DANA | DANA |
10003 | GOPAY | GOPAY |
10006 | MULTICOR | Bank MULTICOR |
10008 | SHOPEEPAY | SHOPEEPAY |
10009 | LINKAJA | LINKAJA |
10010 | MUTIARA | Bank MUTIARA |