Commerce: How to update an order status via the frontend
A customer can not update the order status from the front end. Only a user in the CP with the right permissions can do so from the Edit Order page.
To add this functionality you would need to make your own controller action endpoint (in a plugin or module) that does the following:
&lt;?php

namespace modules\mymodule\controllers;

use modules\mymodule\MyModule;

use Craft;
use craft\web\Controller;

/**
 * @author    You
 * @package   MyModule
 * @since     1.0.0
 */
class UpdateOrderStatusController extends Controller
{
    protected $allowAnonymous = ['index'];

    /**
     * @return mixed
     */
    public function actionIndex()
    {
        $this-&gt;requirePostRequest();
        $this-&gt;requireAcceptsJson()
        // validate the current user is allowed to edit the order?

        $newStatusId = Craft::$app-&gt;getRequest()-&gt;getRequiredParam('statusId');
        $message = Craft::$app-&gt;getRequest()-&gt;getRequiredParam('message');
        $orderNumber = Craft::$app-&gt;getRequest()-&gt;getRequiredParam('number');
        $order = Order::find()-&gt;number($orderNumber)-&gt;one();

        if($order){
          $order-&gt;orderStatusId = $newStatusId;
          $order-&gt;message = $message;
          Craft::$app-&gt;getElements()-&gt;saveElement($order, false);
          return $this-&gt;asJson([
              'errors' =&gt; $order-&gt;getErrors(),
              'success' =&gt; !$order-&gt;hasErrors(),
          ]);
        }

        return $this-&gt;asJson([
            'errors' =&gt; ['No order found'],
            'success' =&gt; false,
        ]);
    }
}