skip to Main Content

How can put an option to cancel an order from the customer interface or after the customer logins in his account in shopify? I’m not sure if this is possible, I know that orders are cancelled through the backend of shopify, so I’m hoping if there is a way that the customer himself can cancel their order. Thanks

2

Answers


  1. If you look at any order in Shopify that is open, under the Shopify More Actions menu, there is link to click labelled Cancel Order.

    Login or Signup to reply.
  2. There is a workaround for it. Use shopify’s admin API to cancel the order. You’ll be able to refund as well.

    POST /admin/orders/#{order_id}/cancel.json
    

    Ref: https://help.shopify.com/en/api/reference/orders/order#cancel

    You may not be able to call this API directly from browser. You can follow below procedures to cancel the order:

    1. Make an API which takes order id from request and cancels the order using above mentioned API. This logic will live at server side.
    2. Make order cancellation request from customer’s end with order id to cancel the order.

    If someone has a different way, please share. Thanks

    Pro tip: If you want extra security that no one should misuse the API that you built, pass order id, customer id, line item id etc and verify that order at your server end and then cancel the order.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search