01POST /carts creates a cart. Add, update and remove line items by sku; prices and quantities are integers, money is integer cents.
02POST /carts/:id/coupons attaches one of the store's fixed coupon codes. Percentage coupons apply before fixed ones, each to the amount left after the previous one.
03GET /carts/:id/totals returns subtotalCents, discountCents, taxCents and totalCents.
04A fixed coupon never takes the amount below zero, so totals are never negative.
What the hidden tests check
Everything the interviewer tells you is checked.
Totals are checked to the exact cent, including when coupons stack and when a coupon is worth more than the cart.
4 more details are held back. In a mock interview they come out only when you ask the interviewer the right question; in practice they are listed in the workspace.