Get notified on unsuccessful payouts
This is a notification that Trustly will send to the merchant's system in order to notify the reason on why a payout has failed.
Only available in production environment
This notification is not enabled by default. Please contact your Trustly integration manager in case you want to receive it.
A typical scenario is:
- A merchant sends an AccountPayout or Withdraw or Refund request to Trustly’s API (and in the case of a Withdrawal, a debit notification is sent to the merchant and the merchant approves the Withdrawal).
- Trustly instruct to send the funds to the recipient’s bank account.
- As soon as Trustly get notified that the payout cannot be sent or was returned, Trustly will send a "payoutfailed" notification to the NotificationURL specified in the AccountPayout or Withdraw API call, or for a Refund to the NotificationURL from the original Deposit.
Example of "payoutfailed" notification JSON RPC HTTPS POST data, sent by the Trustly system to the merchants listening service at the specified NotificationURL:
{
"version": "1.1",
"method": "payoutfailed",
"params": {
"signature": "SZth3ylS1[...]5Jm2dnLKtzVq5IRNXBLvh3fO6i1ZCXQ==",
"data": {
"currency": "SEK",
"notificationid": "1716888077",
"orderid": "3236871181",
"enduserid": "user_534412",
"messageid": "483212",
"amount": "49.90",
"timestamp": "2019-03-27 10:04:01.446937+01",
"errorcode": "incorrect_account_number",
"errormessage": "Format of the account number specified is not correct"
},
"uuid": "42d7e0a2-03e2-49fc-bcf7-c109fb411514"
}
}
New parameters may be added to the notification in future versions of the API but current parameters will never be removed.
Parameter name | Description | Type | Example |
---|---|---|---|
amount | The amount that has been paid out in decimal format. Dot (.) is used as decimal separator. | numeric | 49.90 |
enduserid | The ID of the end-user in the merchant’s system. | text | user_534412 |
currency | The payout currency. | text | SEK |
messageid | The merchant’s unique ID of the transaction. | text | 483212 |
notificationid | Unique ID for this notification. Each notification must only be handled once in your system. | text | 1716888077 |
orderid | The unique ID in Trustly’s system for this payout. | text | 3236871181 |
timestamp | The date and time when the payout was confirmed, and the GMT offset (+01 means GMT + 1 hours). | text | 2019-03-27 10:04:01.446937+01 |
errorcode | Short code of the error | text | incorrect_account_number |
errormessage | Description of the error | text | Format of the account number specified is not correct |
Valid responses are:
Status | Description |
---|---|
OK | The notification has been received. |
Example of a payout error response:
{
"result": {
"signature": "Dd0hjuf17sH0Ku ... S16VbaRzz==",
"uuid": "42d7e0a2-03e2-49fc-bcf7-c109fb411514",
"method": "payoutfailed",
"data": {
"status": "OK"
}
},
"version": "1.1"
}