@wocart/storefront / index / CheckoutDraft
Interface: CheckoutDraft
Mutable checkout intent before the server accepts an order.
Invariant: mode: "single" has exactly one line; mode: "basket" has
one or more lines. This is intentionally a domain contract, not a second
copy of merchant checkout-policy validation: the server remains the owner
of required fields, legal pages, prices, stock and delivery rules.
Properties
address?
readonlyoptionaladdress?:string
attribution
readonlyattribution:CheckoutAttribution
couponCode?
readonlyoptionalcouponCode?:string
The code the shopper typed, if any; the server decides whether it applies.
customerName
readonlycustomerName:string
customFieldResponses
readonlycustomFieldResponses: readonlyCheckoutFieldAnswer[]
delivery
readonlydelivery:object
address?
optionaladdress?:string
communeId
communeId:
string
deliveryType
deliveryType:
"home"|"stop_desk"
wilayaId
wilayaId:
number
email?
readonlyoptionalemail?:string
lines
readonlylines: readonlyobject[]
mode
readonlymode:"single"|"basket"
notes?
readonlyoptionalnotes?:string
otpProof
readonlyotpProof: {kind:"verified";phone:string;token:string; } | {kind:"bypass";phone:string;reason:string;token:string; }
phone
readonlyphone:string