Skip to main content

Checkout quote

POST 

/v2/checkout/quote

Read-only. It is the ONE call that prices a cart and describes it (it replaces POST /cart/total for the v2 sites): every line also carries its name, slug, cover, options, available stock and the delivery methods the product allows, read from OpenSearch like /cart/total does (from Postgres only if OpenSearch is down). Computes what the customer would pay, with the store checkout hooks applied: lines with net, VAT and gross (per unit and per line, rounded to the currency digits), discounts, shipping options with their cost and the totals. It writes nothing (hook logs are written only when a hook fails), but it tracks the cart (cartTrackingId, when sent) for the abandoned-cart analytics, as POST /cart/total of commerce-core does. A line that cannot be bought because there is not enough stock (no backorder) is NOT an error here: it comes back in unavailable, priced like the others but without discounts, and it is left out of items, totals, promotions, shipping and hooks; the whole line is unavailable even if some units exist (availableStock says how many). If no line can be bought, items is empty and the totals are zero. The payment never accepts such a line (400). Without shippingMethodId the totals exclude shipping and shippingPending is true; each option reports grandGrossIfSelected. Hooks run in two phases: cart-transform hooks one after the other (by position, then creation date), then discount, shipping and validation hooks in parallel. The server never takes a total from a hook: it applies what the hooks ask for, on the net amounts.

Request​

Responses​

The quote.