Use Trustly APIs to integrate account authorizations and online banking into your applications.
Authentication
Trustly APIs are designed to safeguard sensitive data and ensure a secure transaction environment. In addition to HTTPS authentication, you can encrypt individual requests and field-level data for additional security. 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/transactions
Replace 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.
Though some endpoints may have additional filtering attributes, the following table lists the common methods.
Parameter | Description |
---|---|
count | Number of items to return. Default is 25 with a maximum value of 100. |
startIndex | Start index (starts at 0 ) of the resources to be returned. 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. |