How to get price from checkout page/DOM securely

am a beginner and i need help in integrating paypal. Am using node.js and ejs template engine for my project. I am trying to get price from DOM and sending it to nodejs route in post request. I want to find a secure way to get price from dom so user can’t change it using html inspector.

Right now am getting package id from url and sending it inside body of request and then finding the price in database. For quantity am getting it from dom and sending it in request body.

I need to implement discount voucher functionality what’s the best practices to get these values from DOM?