How can I retrieve the checkout ID from my e-commerce webpage?

Hi,

We are building e-commerce with two sides

I want to get the current checkout ID that is inside myshopify to use it in my app.
I searched in LocalStorage / Cookies in order to find a checkout ID but don’t found anything that allows me to get the checkout ID created on myshopify.

Basically, what I want to do is to redirect the user that created a cart on myshopify to the app by forcing them to log/register in the app because of bought items give access to some content within the app.

Is that possible to force a redirection from myshopify to my app or get the checkout ID and override the pay button inside the myshopify cart page ?