---
title: "Discussion on \"\"Your product configurator should price server-side, not in JavaScript\"\" | Hashnode"
description: "Discussion on \"\"Your product configurator should price server-side, not in JavaScript\"\". Open the devtools on a lot of product configurators, switch to the Network or Sources tab, and you can read the price list. Quantity tiers, wholesale discounts, margin logic, all of it, because the pr"
url: "https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec"
---

[Feed](https://hashnode.com/feed) /

Discussion

# ["Your product configurator should price server-side, not in JavaScript"](https://grodev.hashnode.dev/your-product-configurator-should-price-server-side-not-in-javascript?utm_source=hashnode&utm_medium=feed)

Open the devtools on a lot of product configurators, switch to the Network or Sources tab, and you can read the price list. Quantity tiers, wholesale discounts, margin logic, all of it, because the pr

Nov 4 · 5 min read · grodev.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#security](https://hashnode.com/tag/security)
-   [#architecture](https://hashnode.com/tag/architecture)

## Written by

[Dominik Groński](https://hashnode.com/@grodev)

@grodev · Poznań, Poland

  
[View profile](https://hashnode.com/@grodev)

Full-stack dev · WooCommerce · Laravel · 3D configurators

Full-stack developer from Poznań, Poland. I build premium websites, WooCommerce stores and custom Laravel + Filament systems for Polish SMBs. I write here about what I actually ship in production: website audits, in-browser 3D configurators, manufacturing panels with Kanban, client portals. No theory, no buzzwords. Concrete + code. Portfolio and live demos: grodev.pl Contact: dominik.gronski@grodev.pl

## Responses 10

Markdown supported · ⌘↵ to post

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Oct 28](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6ae1f2061af2fe448c4699d9)

I've seen the same thing with small tools. It's easy to focus on hiding the logic, but trusting a price from the browser is the bigger mistake. Always let the server have the final say.

[Dominik Groński](https://hashnode.com/@grodev)

[Oct 30](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6ae1f2061af2fe448c4699d9#reply-6ae4d2cf35b16fcf36c73ebc)

Exactly. Obfuscation just buys a false sense of safety, anyone with the Network tab still sees the request go out. I keep a client-side price purely for the instant feel while someone drags a slider, but the server recomputes it from scratch at quote and checkout, and that number is the only one that counts. If the two ever disagree, the browser was wrong by definition.

[Indie Ship Log](https://hashnode.com/@indieshiplog)

[Oct 26](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6adf01b7da89bc08440b9b35)

This is the part I keep relearning on small B2B tools. If the browser can see the tier table, a customer will too. I used to ship the total from the client and only check it loosely on submit. Moving the price calc behind the API, and treating the posted number as untrusted, saved me from a messy discount bug. For a single public price I still leave it in the page.

[Dominik Groński](https://hashnode.com/@grodev)

[Oct 26](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6adf01b7da89bc08440b9b35#reply-6adfa5c34ba8a6158c09c49b)

Exactly this. “Treat the submitted number as untrusted” is the whole game. Keeping one public price for display is fine, the sin is letting that number decide what actually gets charged. Sounds like you landed in the right spot.

[Indie Ship Log](https://hashnode.com/@indieshiplog)

[Oct 25](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6addb09703f6b5700ad9cecb)

The integrity half is the one I keep underestimating. I used to think hiding the price list was the whole problem, then realized a tampered total on submit is worse if the server just trusts it. Sending the config and letting the server recompute on confirm is the version I would actually ship. The bit about a price change being a data change, not a deploy, would have saved me a few Friday releases.

[Dominik Groński](https://hashnode.com/@grodev)

[Oct 26](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6addb09703f6b5700ad9cecb#reply-6adfa5ddba2907af020b0d07)

Recompute on confirm is the key line. And pricing as data instead of deploys was half the reason I wrote this, good to hear it maps to real pain. No more Friday releases just to change a number.

[netproxy](https://hashnode.com/@argumentmoney8117)

[Oct 24](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6add3273c4f536f4a8697edb)

One detail worth handling on the live-price side is out-of-order quote responses: if option changes fire several quote calls, a slower earlier response can overwrite a newer price unless requests are aborted or responses are sequenced against the current configuration.

[Dominik Groński](https://hashnode.com/@grodev)

[Oct 26](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6add3273c4f536f4a8697edb#reply-6adfa6045c90a3734a4b5dd8)

Good catch, that race is real. I abort the in-flight request on every change with AbortController and tag each response with the config it belongs to, so stale answers get dropped. Probably worth its own follow-up post.

[Mahdi Jabinpour](https://hashnode.com/@mahdi-lumowp)

[Oct 24](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6add11325954ca33689881ff)

Separating information leakage from price integrity is useful. I would make the quote reference carry an explicit pricing-version and expiry policy too: if the rules change between preview and acceptance, silently recomputing can surprise the buyer even when the server is authoritative. A clear “quote expired, review the new total” step keeps the security boundary and the buying experience aligned.

[Dominik Groński](https://hashnode.com/@grodev)

[Oct 26](https://hashnode.com/posts/your-product-configurator-should-price-server-side-not-in-javascript/6add0167ec89e98b22ec86ec/comment/6add11325954ca33689881ff#reply-6adfa61c3b9bd4b0552f1b73)

Yes. A quote should carry a version and an expiry, and on acceptance you revalidate server-side. If the rules moved, show “quote expired” with the new total instead of silently recalculating. Silent recalculation is how you lose trust.
