# HppCatalogOrder

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

The catalog order behind a hosted payment: the products a page sells, at the prices in force when
the payment link was created, with the quantities currently chosen. Built once at session create
(or at render for a page opened without a link), carried onto the session, rendered by the public
surfaces, and resolved against the payer's selections when they submit. The subtotal is always
recomputed from the lines by `HppCatalogOrderPolicy`; nothing a browser sends is a
price.

## Fields
- `lines` (array<[HppCatalogOrderLine](https://devportal.demo.winkpg.io/docs/api/models/HppCatalogOrderLine.md)>): The products on the order, in display order. (nullable)
  Fields of each item:
  - `productId` (string(uuid)): The catalog product this line sells.
  - `displayOrder` (integer(int32)): Position in the payer-facing list.
  - `name` (string): Display name at snapshot time. (nullable)
  - `unitPrice` (number(double)): Price per unit at snapshot time.
  - `allowFractionalQuantity` (boolean): Whether a non-integer quantity is allowed.
  - `minimumQuantity` (number(double)): The smallest quantity a payer may buy: the larger of the catalog's floor and the page's own.
  - `maximumQuantity` (number(double)): The largest quantity a payer may buy: the smaller of the catalog's ceiling, the page's own and  the platform cap.
  - `isOptional` (boolean): `true` for an add-on the payer may leave out.
  - `allowQuantityChange` (boolean): Whether the payer may change `quantity`.
  - `defaultQuantity` (number(double)): The quantity the page configured for this product (or the link overrode it to): what a  fixed-quantity line always sells, and what an optional line returns to when re-selected.
  - `quantity` (number(double)): The quantity currently on the order. Starts at the page's default (or the link's own  override) and, once the payer submits, holds what they chose. Zero on an optional line the  payer left out.
  - `isTaxable` (boolean): Whether the product is taxable.
  - `description` (string): Optional longer description at snapshot time. (nullable)
  - `productCode` (string): Optional SKU at snapshot time. (nullable)
  - `unitOfMeasure` (string): Optional unit label at snapshot time. (nullable)
  - `taxCode` (string): Optional tax code at snapshot time. (nullable)
  - `taxAmount` (number(double)): Tax attributed to this line. Zero until a tax mode attributes one; the platform's tax modes  are a separate concern and this line only carries their answer. (nullable)
  - `discountAmount` (number(double)): Discount attributed to this line. Zero until a promotion is apportioned; the promotion comes  off the order subtotal as a whole today. (nullable)
  - `lineTotal` (number(double)): `unitPrice` times `quantity`, rounded to cents. Recomputed by the  policy whenever the quantity changes; stored so a reader of the document does not have to. (nullable)
- `currency` (string): The ISO 4217 code every line is priced in, or `null` when it was not known at snapshot  time (read as the merchant's currency). (nullable)
- `subtotalAmount` (number(double)): The sum of the selected lines' totals, rounded to cents. Stored alongside the lines so a  reader does not have to recompute it; `HppCatalogOrderPolicy` keeps it in step. (nullable)

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
