Trustly uses conventional HTTP response codes to indicate success or failure of an API request.
HTTP Status Code | Description |
---|---|
400 Bad Request | Often due to a missing, required parameter. |
401 Unauthorized | Invalid accessId or accessKey . |
404 Not Found | This endpoint is not supported or defined by Trustly |
500 Server error | Internal Trustly error. |
503 Service Unavailable | The server is currently unable to handle the request due to temporary overloading or server maintenance. |
Sample Error response
Most error responses from the Trustly API will also include a response object containing an array of any errors recorded and any available metadata.
{
"errors": [
{
"domain" : "com.trustly.merchantgateway.v1.exception.InvalidParameterException",
"code" : 200,
"message" : "Could not find a transaction using Id 10000021"
}
]
}
Error Code | Description |
---|---|
100 | Internal error. An internal error (an internal database exception for example) occurred when trying to process the request. |
150 | Remote error. A remote error (the consumer's bank interface is down) occurred when trying to process the request. This is an internal error. |
200 | Invalid parameter error. One of the request parameters is invalid (sending an invalid amount format string for example). |
210 | This is a duplicate request. It has been ignored. |
300 | Security error. These are generic security errors that can happen when trying to process the request. |
326 | Expired split token. |
330 | Invalid account. |
331 | Not enough balance. |
375 | Access control error. This occurs when some security parameter (accessId, accessKey or requestSignature) is invalid and the request cannot be processed. |
380 | Invalid Split Token. |
390 | Fraud analysis. Suspicious transaction or negative data. |
397 | splitToken is not valid. |