Use Trustly APIs to integrate account authorizations and online banking into your applications.
Authentication
Trustly APIs require HTTPS for authentication. For additional security, you can encrypt individual requests and field-level data. See Securing Requests.
Basic Authentication for HTTPS APIs involves sending a username and password encoded in Base64 within the request header. The client includes an "Authorization" header with the value "Basic" followed by the Base64-encoded concatenation of the username and password, separated by a colon. Read more about Basic Authentication on MDN.
Basic Authentication with the Trustly API requires your provisioned credentials (accessId and accessKey). Your accessId is the username and your accessKey is the password. If you're using cURL, use the format shown in the following example:
curl --user accessId:accessKey https://sandbox.trustly.one/api/v1/transactionsReplace accessId and accessKey with your credentials.
Paging and filtering
Requests that return multiple items return 25 items per page by default. By combining the count and startIndex parameters, lists can be paged to retrieve all available data.
Some endpoints support additional filtering attributes. The following table lists the common parameters available across the API.
| Parameter | Description |
|---|---|
| count | The number of items to return. Default is 25 with a maximum value of 100. |
| startIndex | The zero-based index of the first item to return. Typically used to jump to a specific position in the resource list based on its order. Example for starting at the second item in a list of results: ?startIndex=1 |
| orderBy | Order returned items by createdAt or updatedAt. |
| sortOrder | Sort based on order of results. Options include asc for ascending order or desc for descending order (default). |
| createdAt.start | Resource create time (Unix Timestamp) that indicates the start of a range of results. |
| createdAt.end | Resource create time (Unix Timestamp) that indicates the end of a range of results. |
| updatedAt.start | Resource update time (Unix Timestamp) that indicates the start of a range of results. |
| updatedAt.end | Resource update time (Unix Timestamp) that indicates the end of a range of results. |