API

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.

ParameterDescription
countNumber of items to return. Default is 25 with a maximum value of 100.
startIndexStart 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
orderByOrder returned items by createdAt or updatedAt.
sortOrderSort based on order of results. Options include asc for ascending order or desc for descending order (default).
createdAt.startResource create time (Unix Timestamp) that indicates the start of a range of results.
createdAt.endResource create time (Unix Timestamp) that indicates the end of a range of results.
updatedAt.startResource update time (Unix Timestamp) that indicates the start of a range of results.
updatedAt.endResource update time (Unix Timestamp) that indicates the end of a range of results.