Card Encryption

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.

  • Prepend "enc-" to the encrypted detail.

  • Pass the details to Juspay in the transaction call.

Note

Algorithm: RSA/ECB/PKCS1Padding
Key Size: 2048 bit

Scroll inside to view more
Field
Description
Sample Data
card_encoding_version
The version of encryption
2021-01-21
client_enc_key_id
The Key id provided by Juspay. Required for merchant specific RSA keys
9999
card_number
Encrypted card number. Prepend "enc-" to the encrypted detail
enc-13df32hfjhrf
card_exp_month
Encrypted card expiry month. Prepend "enc-" to the encrypted detail
enc-ytgrfdsxfcvbjm
card_exp_year
Encrypted card expiry year. Prepend "enc-" to the encrypted detail
enc-kiujytgrfdxcvbn
card_token
The card token obtained in the response of list card. Required for saved card transaction.
tkn_b095fb039015642b4b8a80eac132368b0
card_security_code
Encrypted card security code. Prepend "enc-" to the encrypted detail
Row enc-jhkhgxxxzxcf

Sample Code Snippet for Encryption

Sample cURL for transaction API

Response

You may use the below public key for testing in sandbox environment

For Production use the below Public Key.

Last updated 2 years ago