try using the event sales_order_save_commit_after Try below code $orderId = $observer->getEvent()->getOrder()->getEntityId();