Get Active Id

getActiveId is used to fetch the active cart ID if any exists.

Examples

// Using the 'getActiveId' function
try {
    const id = sdk.cart.getActiveId();
} catch (error) {
    // Handle errors
}

Return Value

This returns either the cart ID string or undefined