StoreFront API “checkoutCompleteFree” Not working

Ch_M_Zia
Shopify Partner
1 0 0

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"
      ]
    }
  ]
}

 

Replies 7 (7)

Anurag6
Tourist
9 0 3

Hello,

I am getting the same issue while tring to checkout for free for COD. Please help me in this.

Thanks,

Anurag

Jordan_Cooperm1
Excursionist
14 0 4

Same problem as above. worrisome that this was posted in May of 2017, is there any progress or explanation of this problem?

Jordan_Cooperm1
Excursionist
14 0 4

@Ch M Zia Did you ever find any additional information about this issue?

Ashley_Fulks
Shopify Staff (Retired)
4 0 0

Hello,

Ashley from escalated support here. I did some digging on checkoutCompleteFree and found that mutation is used only for completing a checkout that doesn't cost anything - it must be free. The GraphQL API and the SDK currently don't support manual payments that are available in Admin.

So a work around would be to use the REST API until we have a Graphql mutator for COD use.

I hope this answers your question,

Ashley Fulks
Escalated Support Shopify

To learn more visit the Shopify Help Center or the Community Blog.

Anurag6
Tourist
9 0 3

Hello,

Can anyone please suggest me that which Api should be used for Cash On Dilivery?

Thanks,

Anurag

  

Karthikan
Tourist
3 0 1

Any update on this API? I tired to complete order, but got this error.

proxamama
Shopify Partner
6 0 2

I'm getting the same error using checkoutCompleteFree API, is there an API for COD yet?