In addition to using the dedicated API service, you can also cancel an order directly from the Gelato Dashboard.
First, go to Orders in the left menu and find the order you wish to cancel.
Then click on the order to open the detail page and select the Cancel button.
You can cancel orders only before they are printed, i.e. status Digitizing, Uploading or Passed. If you cancel your order the refund will be automatically credited to your Gelato Wallet.
Read more on order status here.