I want to use the checkout api → https://apikey:password@store-name.myshopify.com/admin/api/2020-01/checkouts.json.
I tired both ways by using a sales channel sdk public app and tried to use the private app. Inside the private and public app I have mentioned all the required read and write access for checkouts to work from my end.
But unfortunately it gives me a 200 response code with below html as a response from API. I want to create an empty checkout for now to just make sure that the API will work so that I can make more custom checkouts at my end. The end goal for me is to get the checkout id, 201 response code from api
ContinueI am refering to this doc https://shopify.dev/docs/admin-api/rest/reference/sales-channels/checkout for creating a custom checkout.
To Do
Create a checkout with a product variant and quantity
POST /admin/api/2020-01/checkouts.json
{
"checkout": {
"line_items": [
{
"variant_id": 447654529,
"quantity": 5
}
]
}
}
I will substitute the apikey and passowrd/shared secret from my account with variant id of my product to create a simple checkout which will give me
Location: https://apple.myshopify.com/admin/api/2020-01/checkouts/07aa86bb01cda55f32a5eaf3895d4444.json
a Checkout ID to proceed further. but instead the api returns 200 response with html code. Request you to please help me as soon as possible. Thanks in advance.