Back to Blog
One Checkout Rule That Prevents Bad Orders
Availability should be checked again when the order is created — not only when the customer first adds the product to the cart.
A product can be available when it enters the cart and unavailable by the time checkout finishes.
That is why stock or availability rules should be validated again at the moment the order is created.
The cart is a temporary client state. The final order should be created from current server-side data.
This small rule prevents a class of problems where the interface says “success” even though the business cannot actually fulfil the order.
