Order couldn't be processed/Price of products in the cart may have changed

Since products are defined directly in the HTML markup, it could be pretty easy for a malicious customer to use their developer tools to manipulate product data and process fraudulent orders. To prevent that, we implemented an order validation mechanism.

It’s important to consider this when developing a project with Snipcart. If you get this error:

You get this error because order validation fails. You will find more information on the product causing the error in de developer logs and in the developer console of your browser.

Make sure the data-item-url points to the page with the Snipcart button if you are using the HTML crawler or to the product definition if you are using the JSON crawler.

If you are using a relative URL, make sure you set up the default domain. This URL needs to be publicly accessible. If you want to test in local development, you can use a tool like ngrok.

If you are creating the buttons dynamically, the crawler will not work since it doesn’t execute javascript. In this case, you will probably need to use the JSON crawler.

1 « J'aime »

Hi @Kian

That would make it very easy to change the price of a product, just changing the price with the browser inspector would be enough for a user to “hack” the site and pay whatever value for the product, so it is not something we offer.

Still, if you believe there is a valid use case for that, or if you’re running into any issue, please let us know.

Thanks.