Get updated when customers' bank accounts are credited
This is a method that Trustly will call on the merchant's system when the merchant's end-user's account balance should be credited (increased). This could for example be when a deposit has been made or a previously requested withdrawal has been cancelled.
For e-commerce merchants, this is when the item should be shipped to the end-user.
Example of credit notification JSON-RPC HTTPS POST data, sent by the Trustly system to the merchants listening service at the specified NotificationURL:
{
"method": "credit",
"params": {
"signature": "D67hjuMqbsH0Ku ... S16VbzRsw==",
"uuid": "258a2184-2842-b485-25ca-293525152425",
"data": {
"amount": "902.50",
"currency": "EUR",
"messageid": "98348932",
"orderid": "87654567",
"enduserid": "32123",
"notificationid": "9876543456",
"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 increase 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 | 98348932 |
orderid | The unique ID in our system for your messageid | Text | 87654567 |
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 request to increase the end-user's balance has been received. |
Example of OK response:
{
"result": {
"signature": "D5FjuMqf3H0Ku ... S16VbzR5v==",
"uuid": "258a2184-2842-b485-25ca-293525152425",
"method": "credit",
"data": {
"status": "OK"
}
},
"version":"1.1"
}