Managing order statuses effectively is key to smooth order processing in any ecommerce setup. Magento 2 offers built-in statuses like Pending, Processing, and Complete, which work well for many stores. But if your business has unique steps in its order fulfillment process, you may want to define custom order statuses that better reflect what’s happening behind the scenes.
For example, you need to show order statuses in Magento 2 like:

In this guide, we’ll walk through the full process of:
- Creating a custom order status and assigning it to an order state.
- Updating the order status programmatically.
- Automatically setting the custom status for new orders using an observer.
ON THIS PAGE
How to Create a Custom Order Status in Magento 2 (Programmatically)
Magento separates order states and order statuses:
- Order State: A system-defined value (like new, processing, complete) that represents the stage of the order.
- Order Status: A human-readable label for what’s happening at that stage. Multiple statuses can map to a single state.
For example:
State | Status |
new | pending, awaiting_payment |
processing | payment_approved, packaging |
complete | delivered, invoiced |
Please check the blog below for more details on how to create a custom order status via the admin and programmatically.
Recommended Read: How to Create Magento 2 Order Status & Order State In Magento 2
How to Update Order Status in Magento 2 Programmatically
Programmatic updates allow you to adjust order statuses as part of your custom logic. For example:
- After the order, a manual review is complete
- Upon receiving payment
- If the order is flagged by fraud detection
Here’s how to update a status manually:
use Magento\Sales\Api\OrderRepositoryInterface;
public function updateOrderStatus($orderId)
{
$order = $this->orderRepository->get($orderId);
$order->setStatus('awaiting_payment');
$this->orderRepository->save($order);
}
Ensure:
- The status is mapped to the current state.
- The state is not complete or canceled unless explicitly intended.
How to Assign Custom Order Status on Order Placement Automatically
Magento fires a sales_order_place_after event after an order is placed. You can catch this and assign a custom status immediately.
Step 1. Add to etc/events.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="sales_order_place_after">
<observer name="set_custom_status" instance="Klizer\UpdateOrderStatus\Observer\SetCustomStatus" />
</event>
</config>
Step 2. Create SetCustomStatus.php
<?php
namespace Klizer\UpdateOrderStatus\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Sales\Api\OrderRepositoryInterface;
class SetCustomStatus implements ObserverInterface
{
protected $orderRepository;
public function __construct(OrderRepositoryInterface $orderRepository)
{
$this->orderRepository = $orderRepository;
}
public function execute(Observer $observer)
{
$order = $observer->getOrder();
if ($order->getState() === Order::STATE_NEW && $order->getPayment()->getMethod() === 'checkmo') {
$order->setStatus(“pending_verification”);
$this->orderRepository->save($order);
}
}
}

Real Use Cases
1. Marketplace Approvals
- Custom Status: awaiting_seller_confirmation
- Used in multi-vendor marketplaces for approval flow
2. B2B Purchase Orders
- Status: review_by_finance
- Reflects internal credit team checks
3. Partial Shipments
- Status: partially_fulfilled
- When only some items are shipped
4. Ready for Store Pickup
- Status: ready_for_pickup
- For omnichannel and in-store fulfillment workflows
FAQs
Q1. Can I add multiple custom statuses to the same state?
Yes. States like processing or new can have many custom statuses mapped.
Q2. Will the status update notify the customer?
Only if you trigger an email explicitly or use the status with built-in email settings.
Q3. Can I change the state programmatically?
Yes, but this needs caution and should follow Magento’s order flow rules.
Final Thoughts
Custom order status in Magento 2 helps you manage orders better and keep customers informed. You can create your own statuses, match them to order states, update them with code, and even set them automatically. Just plan your workflow, use clear labels, and test everything before going live. This small change can make your store run smoother and build customer trust.
Need help setting it up? Work with expert Magento development partners who can guide you. The right Magento solutions make it easier to grow your store and handle orders the way your business needs.