Initial js checkout logic