How to secure api payload data?

I have a form, which contains some crucial data such as amount details, user details etc. These are crucial data built from front end. These values are required by the front end form and backend api.

Now, I am making a post request to an api sending the form details as payload. Here, I am able to edit the form input data from developer tools and still able to submit the form and successfully save the
corrupted data in database. This must not happen!. The data must not be edited by any user.

So, How can I pass some crucial data to an post api without it being corrupted by user ?

There is no way to protect the data from manipulation on the client. The only thing you can do is validate the data on the server before putting it into the database. For security there is a rule to never trust data that comes from the client, it can always been manipulated.

So, I have to use the same function of frontend in backend too