How to create checkout by api in online store

I have the same issue, but I also need to keep track of which products came from my costume app.

I will try using the Shopify API to create a Shopify app to solve this, but not sure if it would produce the same outcome as solution 2.

did the third solution work for you?