Card Details Encryption for ALT ID & Tokenization

The card details(card number, expiry month, expiry year, cvv) can be encrypted before passing to Juspay using the asymmetric cryptographic algorithm.

  • The public key will be shared by Juspay which can be used for encryption.

  • Encrypt the card details using the shared public key. The sample code snippet is given below.

Note

Encryption method and algorithm

Algorithm: RSA-OAEP-256
ENC: A128GCM

Required inputs to be encrypted are given below:

Scroll inside to view more
Field Name
Required
Type
cardNumber
Yes
String
expYear
Yes
String
expMonth
Yes
String
cardSecurityCode
Conditional
String

Dependencies to run the code

You may use the below public key and keyId for testing in sandbox/production environment respectively:

Sandbox: 2218168c-ee6b-49d7-a851-8b94e7d0068d

Production keyId:4418168c-aa6b-49d7-a987-1b94e7d2268d

Sample Code Snippet for Encryption

Warning

For latest update on guidelines, please refer to the RBI website or your banking partner

Last updated 8 months ago