Get updated when customers' bank accounts are debited
The debit notification will be sent to the merchant's NotificationURL when the end user's account balance should be debited (decreased) on the merchant's side.
A debit notification is issued under two specific circumstances:
- The funds have not been received for a Deposit: In instances where a credit notification has been previously sent, but the corresponding funds fail to settle, a debit notification is sent to the merchant. This occurs after a standard waiting period of 3 bank days, although in certain situations, the duration may extend to as long as 10 bank days.
- Initiated Withdrawal Request: When a user completes the Withdrawal process in the Trustly checkout, a debit notification is sent to the merchant.
Example of debit notification JSON RPC HTTPS POST data, sent by the Trustly system to the merchants listening service at the specified NotificationURL:
{
"method": "debit",
"params": {
"signature": "K5+hjuMqbsH0Ku ... S16VbzRsw==",
"uuid": "258a2184-2842-b485-25ca-293525152425",
"data": {
"amount": "902.50",
"currency": "EUR",
"messageid": "77898765",
"orderid": "127675892",
"enduserid": "32123",
"notificationid": "456787654",
"timestamp": "2010-01-20 14:42:04.675645+01",
"attributes": {}
}
},
"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 key | Description | Type | Example |
---|---|---|---|
amount | The amount to decrease the end-user's balance with. In decimal format. Dot (.) is used as decimal separator. | Numeric | 100.05 |
currency | The ISO 4217 code of the currency. | Char(3) | EUR |
messageid | Your unique ID of the transaction. | Text | 77898765 |
orderid | The unique ID in our system for your messageid | Text | 127675892 |
enduserid | The ID of the end-user in your system. | Text | 32123 |
notificationid | Unique ID for this notification. Each notification must only be handled once in your system. | Text | 4567897654 |
timestamp | The time of the transaction and the GMT offset (+01 means GMT + 1 hours). | Text | 2010-01-20 14:42:04.675645+01 |
attributes | Optional attributes for this notification. There are currently no attributes for this notification. | Hash |
Valid responses are:
Status | Description |
---|---|
OK | The notification has been received and the merchant's system was able to decrease the end-user's account balance with the specified amount and currency. |
FAILED | The notification has been received and the merchant's system was unable to decrease the end-user's account balance with the specified amount and currency. For withdrawal requests, this means that the withdrawal will not be processed. |
Example of OK / FAILED response:
{
"result": {
"signature": "K47hjudG6sH0Ku ... S16VbzfG8==",
"uuid": "258a2184-2842-b485-25ca-293525152425",
"method": "debit",
"data": {
"status": "OK"
}
},
"version":"1.1"
}
{
"result": {
"signature": "K47hjudG6sH0Ku ... S16VbzfG8==",
"uuid": "258a2184-2842-b485-25ca-293525152425",
"method": "debit",
"data": {
"status": "FAILED"
}
},
"version":"1.1"
}