Interface: FinalizeOptions
Defined in: server/checkout/cart-service.ts:47
Properties
customerEmail?
optional customerEmail?: string;Defined in: server/checkout/cart-service.ts:56
Fallback contact when the cart has no guest email.
expectedTotalCents
expectedTotalCents: number;Defined in: server/checkout/cart-service.ts:54
The customer total the caller last showed the shopper. finalize
re-prices at the last moment and throws PriceMismatchError if the fresh
customerTotalCents differs — the guard that stops a stale-priced cart
from being charged the wrong amount.
expectedVersion
expectedVersion: number;Defined in: server/checkout/cart-service.ts:73
Optimistic-concurrency guard (proposal §Cart state machine: "the
optimistic-concurrency version column"). finalize bumps
the cart ONLY if its stored version still equals this — a finalize
racing another that already advanced the cart gets
CartVersionConflictError. The value comes from a prior
getCart/getPricedCart the caller showed the shopper.
idempotencyKey?
optional idempotencyKey?: string;Defined in: server/checkout/cart-service.ts:62
Double-submit / re-entry handle. Flows onto the order's
(organizationId, idempotencyKey) unique; a converted cart + a key hit
returns the existing order (see the re-entry rule in finalize).
origin?
optional origin?: string;Defined in: server/checkout/cart-service.ts:64
Consumer-defined channel captured on the order ('checkout' default).