Pin-V2
Set pin
Changed onThis web service provides the ability to set the PIN for a card/token. An encrypted PIN (encrypted with client processing key (CP Key)) is required and needs to meet PIN criteria of strength i.e.
- No simple number sequences like 1234, 0000
- No repeated number like 1111,22222
- Minimum length of 4 digit only
- Maximum length of 12 digit only
Epin Generation Java Example
String cpkey="34df95e9ef7cd3f79c118022a7ef379c"; //CPkey is sent in email during client create
String pin="5296";
SecretKey secretKey = new SecretKeySpec(hexStringToByteArray(cpkey), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/ZeroBytePadding",new BouncyCastleProvider());
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
byte[] bytedata=cipher.doFinal(pin.getBytes());
String epin=byteArrayToHexString(bytedata);
//Function To Convert Hex String to Byte Array
public static byte[] hexStringToByteArray(String Hex) {
int len = Hex.length();
byte[] data = new byte[len / 2];
for(int i = 0; i < len; i += 2) {
data[i / 2] = (byte)((Character.digit(Hex.charAt(i), 16) << 4) + Character.digit(Hex.charAt(i + 1), 16));
}
return data;
}
//Function To Convert Byte Array to Hex String
public static String byteArrayToHexString(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for(int j = 0; j < bytes.length; ++j) {
int v = bytes[j] AND 255;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v AND 15];
}
return new String(hexChars);
}
post/pws/v2/pws_set_pin/
Request
- Base URLhttps://api.uat.paymentology.com/ppws/api
- URLhttps://api.uat.paymentology.com/ppws/api/pws/v2/pws_set_pin/
- Authnone declared
Request body
Example request
{
"api_call_unique_identifier": "438574845790657485",
"client_id": 760131,
"epin": "2F95558EC884E0D879C53D82BDD49140",
"token": 311012081
}Response
Successful Response
Example response
{
"header": {
"error_desc": "success"
},
"body": {
"message": "pin set success"
}
}Changes
- info
endpoint added
- info