I clarify - the client uses blocks:
https://prnt.sc/vjxurzWhen he selects payment in them, he is transferred to the payment page and creates a process
https://crm.ohholding.com.ua/admin/customorder/oplati-dogovorov/?searchLine=If it closes the payment window, the process still remains.
Accordingly, you need "protection from a fool" and the removal of the process as described.
Is it possible to link to the payment window if the user tries to close it with a Yes/No window?
Is it possible to delete the created process if the user answered - Yes?