We are using StoreFront API for making mobile app. When we try to place an order using “COD” function name is “checkoutCompleteFree" its generate an error message “Checkout Requires Payment”. Can anyone help me out on this.
This is the Header
X-Shopify-Storefront-Access-Token
xxxxxxxxxxxxxxxxxxxxxxx
This is the endpoint
https://XYZ.myshopify.com/api/graphql.json
mutation checkoutCompleteFree {
checkoutCompleteFree(checkoutId: "Z2lkOi8vc2hvcGlmeS9DaGVja291dC80ZTI0MWM3MjEzMzVlZmE2YmZhN2Q1ZDJjMGZmM2ZkZT9rZXk9ZmNhOWZkOTdmOGMwZDk3YWExOTIxODMxNzE5OWYwNDM=") {
userErrors {
field
message
}
checkout {
id
}
}
}
Response : -
{
"data": {
"checkoutCompleteFree": null
},
"errors": [
{
"message": "Checkout requires payment.",
"locations": [
{
"line": 3,
"column": 3
}
],
"path": [
"checkoutCompleteFree"
]
}
]
}