How can we cancel an order in Moneric Checkout (MCO)?

We are implementing the Moneris checkout and it looks like the back button doesn't revoke the ticket that we get from Preload request. We need this for security purpose, is there a way we can do that?


- It was working in Moneris Hosted Page (HPP). If you open two tabs with the moneris iframe url, if you cancel one and refresh the other, the transaction is unavailable.

It posts to with parameters "hpp_id", "hpp_ticket" and "doTransaction" set to "cancel_transaction".


- In the new moneris checkout, pressing back posts something similar to, with parameters "ticket" and "action" set to "cancel_order". However, if you do the iframe url trick that I did previously, it doesn't revoke access to the ticket. You can still process the transaction.

 I saw that looks similar, so I tried to change the action to "cancel_order", but all im getting is 200 with empty content.


Is this the expected behavior? Is there a way to trully cancel a transaction?



  • yes the documentation is not very clear, but you need to call:

    function myCancelTransaction(result) {
    var json = JSON.parse(result);
    console.log(json.handler); // only to show you the value
    console.log(json.ticket); // only to show you the value
    console.log(json.response_code); // only to show you the value

    if (json.response_code == 001) {