Add item and get checkout URL (PHP solution preferred)

Highlighted
New Member
2 0 0

Hi Everybody,

 

I'm looking to a way to add a product/variantid and then get the checkouts URL including the required tokens so that I can forward the user to this page.

 

I looked into the available PHP sdks, but non of them seems to have implemented the Storefront API. It's a little strange that there are no solutions for this simple process.

 

I also checked the REST API, but this also doesn't seems to support the checkout functions.

 

Thanks for your help...

 

Carsten

0 Likes
Highlighted
Shopify Staff
Shopify Staff
426 57 65

Hey @tschach ,

 

Have you looked in to the Shopify AJAX API? With this API you can add or remove specific Product Variant IDs to the customer's shopping cart on the online store. Then after you have finished adding/removing Product Variant IDs, you can simply direct the customer to the URL of `{shop-name}.myshopify.com/checkout` and they will be automatically redirected to the correct checkout URL that includes their specific token.  

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes

Hey Carsten,


We have an app that redirects your permalink directly to the clear checkout page, link looks like this, easy to build:

0 Likes