ProductAccount
Get Account With Other
FIND ACCOUNT INFO IN PAYSTACK
URL
domain + /order/thirdFacade/account/findAccountInfoAtPaystack
REQUEST
| PARAMETER | TYPE | REQUIRED | MAX LENGTH | DESCRIPTION | EXAMPLE VALUE |
|---|---|---|---|---|---|
| bankCode | String | true | 10 | Bank codes in Paystack | 0505 |
| accountNumber | String | true | 20 | Merchant user's account number | 78901234567 |
RESPONSE
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| bankCode | String | Bank codes in Paystack |
| accountNumber | String | Merchant user's account number |
| accountName | String | Merchant user's account name |
Implementation method
SDK
// Create an instance of the AccountBean with the DeepxinPayConfig implementation
AccountBean accountBean = new AccountBean(new DeepxinPayConfig() {
@Override
public String getMerchantCode() {
return "Your merchant code";
}
@Override
public String getPublicKey() {
return "Your public key";
}
@Override
public String getPrivateKey() {
return "Your private key";
}
@Override
public String getServerAddress() {
return "https://tenn.deepxin.com";
}
});
// Create a QueryAccountParam instance
QueryAccountParam param = QueryAccountParam.builder()
.bankCode("0505")
.accountNumber("78901238901")
.build();
// Make a request to obtain the URL of the payment page
R<PaystackAccountInfo> paystackAccountInfo = accountBean.findAccountInfoAtPaystack(param);
// Get the transactionNumber from the response data
String accountNumber = paystackAccountInfo.getData().getAccountNumber;
System.out.println("paysatck account number: " + accountNumber);
HTTP
public static void main(String[] args) {
// Replace with the merchant's public key for either the testing environment or the production environment
String merchantPublicKey = "your public key";
// Replace with the merchant's private key for either the testing environment or the production environment
String merchantPrivateKey = "your private key";
// MerchantCode
String merchantCode = "your merchant code";
// Parameters
Map<String, Object> paramMap = getParamMap();
// Encrypt the parameters using the merchant's public key.
String encryptStr = encryptWithPublicKey(paramMap, merchantPublicKey);
// Sign the encrypted parameters using the merchant's public key.
String sign = sign(encryptStr, merchantPublicKey);
// Get Request parameters
Map<String, Object> requestMap = getRequestMap(encryptStr, merchantCode, sign);
String requestStr = JSONUtil.toJsonStr(requestMap);
String tennServerUrl = "https://tenn.deepxin.com/order/thirdFacade/account/findAccountInfoAtPaystack";
try {
String result = HttpUtil.post(tennServerUrl, requestStr);
if (!JSONUtil.isTypeJSON(result)) {
System.out.println("Result is not a JSON type.");
return;
}
JSONObject entries = JSONUtil.parseObj(result);
String toDecryptStr = entries.getStr("data");
String responseSign = entries.getStr("sign");
if (SUCCESS_CODE == entries.getInt("code")) {
boolean verifySign = verify(responseSign, toDecryptStr, merchantPublicKey);
if (verifySign) {
String decryptStr = decryptWithPrivateKey(toDecryptStr, merchantPrivateKey);
System.out.println(decryptStr);
} else {
System.out.println("Signature verification failed.");
}
}else{
System.out.println(result);
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static Map<String, Object> getParamMap() {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("bankCode", "0505");
paramMap.put("accountNumber", "78901238901");
return paramMap;
}
FIND ACCOUNT INFO IN NIBSS
URL
domain + /order/thirdFacade/account/findAccountInfoAtNibss
REQUEST
| PARAMETER | TYPE | REQUIRED | MAX LENGTH | DESCRIPTION | EXAMPLE VALUE |
|---|---|---|---|---|---|
| bankCode | String | true | 10 | Bank codes in Paystack | 0505 |
| accountNumber | String | true | 20 | Merchant user's account number | 78901234567 |
RESPONSE
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| bankCode | String | Bank codes in Paystack |
| accountNumber | String | Merchant user's account number |
| accountName | String | Merchant user's account name |
Implementation method
SDK
// Create an instance of the AccountBean with the DeepxinPayConfig implementation
AccountBean accountBean = new AccountBean(new DeepxinPayConfig() {
@Override
public String getMerchantCode() {
return "Your merchant code";
}
@Override
public String getPublicKey() {
return "Your public key";
}
@Override
public String getPrivateKey() {
return "Your private key";
}
@Override
public String getServerAddress() {
return "https://tenn.deepxin.com";
}
});
// Create a QueryAccountParam instance
QueryAccountParam param = QueryAccountParam.builder()
.bankCode("0505")
.accountNumber("78901238901")
.build();
// Make a request to obtain the URL of the payment page
R<NibssAccountInfo> nibssAccountInfo = accountBean.findAccountInfoAtNibss(param);
// Get the transactionNumber from the response data
String accountNumber = nibssAccountInfo.getData().getAccountNumber;
System.out.println("NIBSS account number: " + accountNumber);
HTTP
public static void main(String[] args) {
// Replace with the merchant's public key for either the testing environment or the production environment
String merchantPublicKey = "your public key";
// Replace with the merchant's private key for either the testing environment or the production environment
String merchantPrivateKey = "your private key";
// MerchantCode
String merchantCode = "your merchant code";
// Parameters
Map<String, Object> paramMap = getParamMap();
// Encrypt the parameters using the merchant's public key.
String encryptStr = encryptWithPublicKey(paramMap, merchantPublicKey);
// Sign the encrypted parameters using the merchant's public key.
String sign = sign(encryptStr, merchantPublicKey);
// Get Request parameters
Map<String, Object> requestMap = getRequestMap(encryptStr, merchantCode, sign);
String requestStr = JSONUtil.toJsonStr(requestMap);
String tennServerUrl = "https://tenn.deepxin.com/order/thirdFacade/account/findAccountInfoAtNibss";
try {
String result = HttpUtil.post(tennServerUrl, requestStr);
if (!JSONUtil.isTypeJSON(result)) {
System.out.println("Result is not a JSON type.");
return;
}
JSONObject entries = JSONUtil.parseObj(result);
String toDecryptStr = entries.getStr("data");
String responseSign = entries.getStr("sign");
if (SUCCESS_CODE == entries.getInt("code")) {
boolean verifySign = verify(responseSign, toDecryptStr, merchantPublicKey);
if (verifySign) {
String decryptStr = decryptWithPrivateKey(toDecryptStr, merchantPrivateKey);
System.out.println(decryptStr);
} else {
System.out.println("Signature verification failed.");
}
}else{
System.out.println(result);
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static Map<String, Object> getParamMap() {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("bankCode", "0505");
paramMap.put("accountNumber", "78901238901");
return paramMap;
}
FIND ACCOUNT INFO IN OTHER
URL
domain + /order/thirdFacade/account/findBankAccountInfo
REQUEST
| PARAMETER | TYPE | REQUIRED | MAX LENGTH | DESCRIPTION | EXAMPLE VALUE |
|---|---|---|---|---|---|
| systemBankCode | String | true | 10 | Bank codes in TENN | 0606 |
| accountNumber | String | true | 20 | Merchant user's account number | 78901234568 |
RESPONSE
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| systemBankCode | String | Bank codes in TENN |
| accountNumber | String | Merchant user's account number |
| accountName | String | Merchant user's account name |
| bankVerificationNumber | String | Bank verification number |
| kycLevel | String | Kyc level |
Implementation method
SDK
// Create an instance of the AccountBean with the DeepxinPayConfig implementation
AccountBean accountBean = new AccountBean(new DeepxinPayConfig() {
@Override
public String getMerchantCode() {
return "Your merchant code";
}
@Override
public String getPublicKey() {
return "Your public key";
}
@Override
public String getPrivateKey() {
return "Your private key";
}
@Override
public String getServerAddress() {
return "https://tenn.deepxin.com";
}
});
// Create a QueryAccountParam instance
QuerySystemAccountParam param = QuerySystemAccountParam.builder()
.systemBankCode("0606")
.accountNumber("78901234568")
.build();
// Make a request to obtain the URL of the payment page
R<ChannelAccountInfo> channelAccountInfo = accountBean.findBankAccountInfo(param);
// Get the transactionNumber from the response data
String accountNumber = channelAccountInfo.getData().getAccountNumber;
System.out.println("paysatck account number: " + accountNumber);
HTTP
public static void main(String[] args) {
// Replace with the merchant's public key for either the testing environment or the production environment
String merchantPublicKey = "your public key";
// Replace with the merchant's private key for either the testing environment or the production environment
String merchantPrivateKey = "your private key";
// MerchantCode
String merchantCode = "your merchant code";
// Parameters
Map<String, Object> paramMap = getParamMap();
// Encrypt the parameters using the merchant's public key.
String encryptStr = encryptWithPublicKey(paramMap, merchantPublicKey);
// Sign the encrypted parameters using the merchant's public key.
String sign = sign(encryptStr, merchantPublicKey);
// Get Request parameters
Map<String, Object> requestMap = getRequestMap(encryptStr, merchantCode, sign);
String requestStr = JSONUtil.toJsonStr(requestMap);
String tennServerUrl = "https://tenn.deepxin.com/order/thirdFacade/account/findBankAccountInfo";
try {
String result = HttpUtil.post(tennServerUrl, requestStr);
if (!JSONUtil.isTypeJSON(result)) {
System.out.println("Result is not a JSON type.");
return;
}
JSONObject entries = JSONUtil.parseObj(result);
String toDecryptStr = entries.getStr("data");
String responseSign = entries.getStr("sign");
if (SUCCESS_CODE == entries.getInt("code")) {
boolean verifySign = verify(responseSign, toDecryptStr, merchantPublicKey);
if (verifySign) {
String decryptStr = decryptWithPrivateKey(toDecryptStr, merchantPrivateKey);
System.out.println(decryptStr);
} else {
System.out.println("Signature verification failed.");
}
}else{
System.out.println(result);
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static Map<String, Object> getParamMap() {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("bankCode", "0606");
paramMap.put("accountNumber", "78901234568");
return paramMap;
}