Get updated when an order is cancelled

The cancel notification is sent to the merchant's NotificationURL when an order is canceled.

For Deposit, Withdraw and SelectAccount orders it will be sent in the following scenarios:

  1. The end-user does not complete all of the steps in the Trustly checkout and closes the browser, or just leaves it open. The cancel notification is sent after 10-30 minutes of inactivity.
  2. The end-user clicks on the “x” (close) button in the upper corner of the Trustly checkout. The cancel notification is sent immediately after this, and the user is redirected to the FailURL that was provided in the API-call. If no FailURL is provided, the "x" button will not be displayed.
  3. An unexpected technical error occurs which causes the order to crash in Trustly's system.
  4. For certain Deposits: the end-user completes the Deposits steps in the Trustly checkout, but the payment is not confirmed immediately (so no credit is sent). A pending notification is sent and the user is redirected to the SuccessURL. If the money does not settle within a certain number of days, a cancel notification may be sent (but not always, it depends on the bank). Note: If a credit notification has already been sent and the money does not settle, a debit notification will be sent instead of cancel. See more details on the Deposit page under "failed Deposits".

When the cancel notification is received any item reservations in your inventory can be canceled.

Example of cancel notification JSON RPC HTTPS POST data, sent by the Trustly system to the merchants listening service at the specified NotificationURL:

{
    "method": "cancel",
    "params": {
        "signature": "F6+hjuMqbsH0Ku ... S16VbzRsw==",
        "uuid": "258a2184-9021-b874-21ca-293425152415",
        "data": {
            "messageid": "98348932",
            "orderid": "87654567",
            "enduserid": "32123",
            "notificationid": "4876513450",
            "timestamp": "2013-12-20 14:42:04.675645+01"
        }
    },
    "version": "1.1"
}

New parameters may be added to the notification in future versions of the API but current parameters will never be removed.

Hash keyDescriptionTypeExample
messageidYour unique ID of the transaction.Text98348932
orderidThe unique ID in our system for your messageidText87654567
enduseridThe ID of the end-user in your system.Text32123
notificationidUnique ID for this notification. Each notification must only be handled once in your system.Text4567897654
timestampThe time of the transaction and the GMT offset (+01 means GMT + 1 hours).Text2010-01-20 14:42:04.675645+01
attributesOptional attributes for this notification. There are currently no attributes for this notification.Hash

Valid responses are:

StatusDescription
OKThe notification has been received.

Example of OK response:

{
    "result": {
        "signature": "Gb7hjuMdj6H044 ... S16VbzVt7==",
        "uuid": "258a2184-9021-b874-21ca-293425152415",
        "method": "cancel",
        "data": {
            "status": "OK"
        }
    },
    "version":"1.1"
}