Encryption Guide

Please refer below implementation guide for JWE / JWS.

NPM Librarylink icon - Above library carries basic understanding of JSON web encryption and its implementation in node.js. You can use this understanding to build your logic for other frameworks.

Note

alg : The alg (algorithm) identifies the cryptographic algorithm used to secure the JWE Encrypted Key. Please use following algorithm: RSA-OAEP

Note

enc : The encryption identifies the symmetric encryption algorithm used to secure the Ciphertext. Please use following encryption: A128CBC-HS256

Note

If JWS is being used please sign the payload using alg: RS256 post encryption


Please refer below request body params for encrypted request:

Scroll inside to view more
Param name
Type
Description
payload
String
Encrypted body payload
kid
String
Juspay private key identifier shared by Juspay
sid
String
Merchant public key identifier shared by Juspay
format
String
Please pass compact always.
Step 1
Stringify the JSON payload
Step 2
Encrypt the Payload
Step 3
Sign the Payload (Optional)
Step 4
Create the payload and call the API
Last updated 2 years ago