Trustly provides a robust API for facilitating bank account authorizations and building powerful Online Banking integrations.
Trustly's APIs prioritize security through robust measures designed to safeguard sensitive data and ensure a secure transaction environment. In addition to the HTTPS authentication described here, individual requests and even field-level data can be encrypted for additional layers of security. See Securing Requests for more details.
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.
Using Basic Auth with the Trustly API requires your provisioned credentials (
accessKey) utilizing your
accessId as the username and your
accessKey as the password. (when using cURL, you can specify them as
accessKeyare combined into a string:
- Encode the string using Base64
- Set the encoded string as the authorization header prefixed by the string
Authorization: Basic SUZfWU9VX0FSRV9SRUFESU5HX1RISVM6WU9VX0dPVF9JVA==
curl this can be done following the example below:
# Simply pass the correct username and password with each request
curl --user accessId:accessKey https://sandbox.trustly.one/api/v1/transactions
Make sure to replace
accessKeywith your credentials.
Transactions are a critical element of the Trustly API. Transactions can have various types and depending on the type, the correlating
transactionId is required for use with most Transactions endpoints.
See more about Transaction types
Requests that return multiple items will by default return 25 items per page. By combining the
startIndex parameters, lists can be easily paged to retrieve all available data.
Though some endpoints may have additional filtering attributes, the common methods are listed here.
|Number of items to return. Default is 25 with a maximum value of 100.
|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:
|Order returned items by
|Sort based on order of results. Options include
asc for ascending order or
desc for descending order (default).
|Resource create time (Unix Timestamp) that indicates the start of a range of results.
|Resource create time (Unix Timestamp) that indicates the end of a range of results.
|Resource update time (Unix Timestamp) that indicates the start of a range of results.
|Resource update time (Unix Timestamp) that indicates the end of a range of results.
Read more about error handling on the Errors page.