Coming to Vietnam: Doubt Regarding Layover

Hey everyone,

Coming to Vietnam for one week. There is a Shopify program happening on April 17.

So, i am from India and we can get e visa for 30 days.

Now the question is:-

The return flight is a connection flight.

Hanoi —> Ho Chi Minh —> Kochi

There is a layover of 17 hours at Ho Chi Minh City airport.

Can i go outside of airport if i have this visa?

Or i have to stay inside the airport terminal 17 hours?

When returning from Hanoi, will they stamp as i am exited from Vietnam?

I don’t have much experience of abroad travelling.

Please help.

Thank you.