Get updated when customers complete the payment process but before Trustly receives money
This is a method that Trustly will call on the merchant's system when the end-user has completed the payment process but before the money has been received by Trustly.
Typically the "thank you"-email to the end-user shall be sent when this notification is received and the item reserved in the inventory. Shipment of the item can wait until you receive the Credit notification.
Example of pending notification JSON RPC HTTPS POST data, sent by the Trustly system to the merchants listening service at the specified NotificationURL:
{
"method": "pending",
"params": {
"signature": "fVhjuMqbsH0Ku ... S16VbzRsw==",
"uuid": "258a2184-2842-b485-23ca-293425152415",
"data": {
"amount": "49.90",
"currency": "EUR",
"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 key | Description | Type | Example |
---|---|---|---|
amount | The amount paid in decimal format. Dot (.) is used as decimal separator. | Numeric | 49.90 |
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 | 2013-12-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. |
Example of OK response:
{
"result": {
"signature": "Jd0hjuf4bsH0Ku ... S16VbzRzz==",
"uuid": "258a2184-2842-b485-23ca-293425152415",
"method": "pending",
"data": {
"status": "OK"
}
},
"version":"1.1"
}