How to prevent users from changing the payment value in javascript when using rest api?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, as you can tell from the title, I am using Paypal rest api (client side) to complete payments. I've noticed that it is childishly simple to change the payment value by user by simply going into the js file. any way to prevent that? Been looking for a solution everywhere with no luck. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We noticed this too when we were thinking about switching to use the js-sdk. Instead, we use server-to-server API calls with their REST, to ensure the values we send them, and receive, have gone through proper channels and don't have any tampering.
Its a LOT of extra work to setup and develop, but in the long run, you feel more confident in the data you are sending paypal and getting back.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Selected Shipping Method amount not updating to cart for card payment in SDKs
- Are there any restrictions to charge using only html, vanilla javascript and php with rest api? in REST APIs
- Disable shipping address in Pay with Credit or Debit card button integration in SDKs
- Change payment Button Text in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- Guest checkout card billing address entered is being replaced in REST APIs