Card

This 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/pws_set_pin/

Request

  • Base URL
    https://api.uat.paymentology.com/ppws/api
  • URL
    https://api.uat.paymentology.com/ppws/api/pws/pws_set_pin/
  • Auth
    none declared

Request body

api_call_unique_identifierstring required

Unique number that must be passed at each API request. Identifier to make each API request unique

client_idinteger required

Unique identifier for the client which Paymentology will provide at outset

epinstring required

AES Encrypted pin with client processing key

tokeninteger required

Public token for the card

user_idstring

User Id of the Customer who triggered the API request.

remarksstring

Remarks for API request

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