Set and read session data via jquery ejs file

I am currently developing a Braintree payment integration which requires to call an UI using jQuery. This works so far. I implemented this step in the code section. However on button submit inside the UI it generates an paymentId and I would like to store that paymentId in the session storage manager. I can’t find any documentation on how to do this in the code section for a .ejs file. Is there any tutorial for this. I need the ID so I can call an endpoint in the server connect.

Community Page
Last updated: