Can I use API to securely embed a checkout form?

I am trying to use a single embedded form on my site to both collect the users information and their credit card information and then pass this information securely to Shopify where an order will be created etc.

Is this possible using the API? Thanks!

Is this covered by this checkout API?

Did you find any solution ?