Canceling an order

An order can be canceled before and after the payment, as long as the latter has not been captured at the bank, i.e. its status is:

  • CREATED and before execution of the order,
  • PENDING.

If you try to cancel the payment between the time of order execution (while still in the CREATED state) and the end of the payment process (i.e. the transition from CREATED to PENDING), you will receive the following error:

{'Order': "This order has been executed and is not cancelable until the end of the payment process"}

Example of a DELETE ORDER call:

DELETE https://secure.lyra.com/marketplace/orders/60c9dbf5-ff99-40fb-9fb6-a709005359f8

In case of success, the server responds with a HTTP 204 code (NO CONTENT).