Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi,
I've built up the connection beetwen my PHP page and Shopify products. That was nice and easy while read products with :
GET /admin/products.json
I would like to collect items on my side, and when the visitor decided to buy, I would like to redirect them to shopify's shop/payment page. As far as I know, here comes the checkout API. I made a call like:
POST /api/checkouts.json
with a json array:
[ 'checkout' => [ 'email' => 'me@example.com', 'line_items' => [ [ 'variant_id' => 5921300807, 'quantity' => 1, ], ], ], ]
btw the problem is, the response message:
Unauthorized: No valid credentials provided.
Is this because I'm not approved for the sales channel sdk, or something else wrong (parameters in array).
Alternative solutions also welcome, my point is to redirect the visitor to the Shopify page wher he/she can pay for the item/items.
Regards, Roland.
I am also facing the same problem. Did you manage to solve?
Hi Roland,
Checkout API is only available to use with the Sales Channel SDK.
To learn more visit the Shopify Help Center or the Community Blog.
Hello Jamie, can you check this topic? it's mine https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/how-generate-a-checkout-url-for-an-exi...
Hi Jamie,
I'm also facing the same issue. If the checkout API is not available for individual stores, can you point us out to other alternatives instead?
Thanks,
@Jamie could you please provide us any alternative method? Especially for testing the checkout api.