Support FAQ API
【Q】:
Everytime when I'm fetching the public key from the certificate. it returns a different value of public key. Is this valid?
2020-09-28 17:15:18
【A】:

Getting the public key from the certificate should be a fixed value.

【Q】:
Is the public key fetched from any certificate file or is it shared from developer?
2020-09-28 17:15:10
【A】:

The public key from the program comes from certificate,  the first and last lines are removed, and the newline character is removed.

【Q】:
Failed to decrypt the message returned by the UPI system.
2020-09-27 16:19:59
Problem details

Failed to decrypt the message returned by the UPI system. The error content is as follows:

Exception in thread "main" javax.crypto.BadPaddingException: Decryption error

at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:383)

at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:294)

at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:363)

at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:389)

at javax.crypto.Cipher.doFinal(Cipher.java:2222)

at Main.decryptByPrivateKey(Main.java:107)

at Main.main(Main.java:31)


【A】:

The ciphertext input to the decryption function must be a byte array:

public static String decryptByPrivateKey(String encryptedDataString, String privateKey) throws Exception {
byte[] encryptedData = Base64Utils.decode(encryptedDataString.getBytes());//Please pay attention to this line
//byte[] encryptedData = encryptedDataString.getBytes();
byte[] keyBytes = Base64Utils.decode(privateKey.getBytes());
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
Key privateK = keyFactory.generatePrivate(pkcs8KeySpec);
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.DECRYPT_MODE, privateK);
int inputLen = encryptedData.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
cache = cipher.doFinal(encryptedData, offSet, MAX_DECRYPT_BLOCK);
} else {
cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_DECRYPT_BLOCK;
}
byte[] decryptedData = out.toByteArray();
out.close();
return new String(decryptedData);
}


【Q】:
Failed to extract the public key from the public key certificate
2020-09-27 16:11:22
Problem details

According to the guidelines, the extraction of the public key from the public key certificate fails with the following error:

javax.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input


【A】:

Check to see if the certificate is formatted correctly. Make sure the certificate is padded with

-----BEGIN CERTIFICATE-----

and 

-----END CERTIFICATE-----

lines


【Q】:
I always got "Signature verification fails." Error.
2020-11-05 14:11:35
【A】:

There are many reasons for UPI System return "Signature verification fails.".The following common causes of errors are for reference: 

1. Messages shall contain no white space or newline between fields.

2. Use the hash value as a byte array to calculate the SHA256 signature.Please make sure that your signature function supports input param as a byte array.


【Q】:
How to leran signature and encryption process?
2020-08-07 15:29:17
【A】:

Developer shall use Acquirer IIN 47030344 in sandbox test, which does not need signature and encryption process. Later when you are ready to go live, we will provide you with complete documentation.

【Q】:
Are all currency supported?
2019-05-06 16:57:26
Problem details

Are all currency supported?

【A】:

We support all currecny transaction, which can be configured under certain Acquirer. For testing acquirer given in sandbox testing, only '156' currency is supported. Please use 156 currency code to test, or you will recieve 'Message Format Error'

【Q】:
Unauthorized Access Error
2019-05-06 16:58:10
Problem details

What if 'Unauthorized access' Error happen?

【A】:

Please check whether the 'acquirerIIN' is 47030344. This IIN does not require developers to encrypt and sign request message.Currently, other IIN is not supported.

【Q】:
Time Requirements for transactions of 'Void' and 'Refund'
2019-01-18 15:25:28
Problem details

What is the time requirements for transactions of 'Void' and 'Refund'?

【A】:

'Void' supports trasactions happened in that day, and 'Refund' supports trasactions happened in one year.

  • Contact Us
  • If you have any further questions, please register and submit order in your user center.