Cancel notification
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:
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.
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 noFailURL
is provided, the "x" button will not be displayed.An unexpected technical error occurs which causes the order to crash in Trustly's system.
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.
New parameters may be added to the notification in future versions of the API but current parameters will never be removed.
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"
}
Valid responses are:
Status | Description |
---|---|
OK | The 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"
}