Cancel order from frontend can be easily achieved with few easy steps:-
Step1:- Change the sales_order_history XML file to change the default order history template(we will add cancel link). Path:- view/frontend/layout/sales_order_history.xml.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
By checking the Redoc reference of this endpoint, you will see that the email field is required also outside the billing address array - https://magento.redoc.ly/2.4.2-guest/#operation/checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost.
Basically your payload should look something like this:
Create frontname_controllerdirectory_controllerclass.xml inside your module view/adminhtml/layout
Then copy all the layout of sales_order_view.xml from vendor/magento/module-sales/view/adminhtml/layout
Then add custom block or your logic you want to implement and create redirect to your link frontname_controllerdirectory_controllerclass and create ...
The ID that appears in the URL is the Magento internal order ID that you will also find in the database as entity_id in the orders table sales_order.
The one displayed with '#' it's called increment_id and you should see it like the 'SKU of the order' as it is usually used to reference the order when integrations with other systems are used. So you will use ...