Every store exposes its cart differently. The ShipKSA SDK adapts to both common shapes through a single cart attribute.
Cart object
If your store keeps its cart as a global JavaScript object, point the SDK at it by name. The SDK reads it lazily at checkout time.
Cart API
If your cart lives behind an endpoint, give the SDK a URL or path and it fetches the cart when needed.
The SDK auto-detects which you provided, so the integration stays a single line for either approach.