> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://amer.developers.trustly.com/api-reference/api/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://amer.developers.trustly.com/_mcp/server. # API reference The Trustly API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. You can use the Trustly API in [sandbox mode](https://sandbox.trustly.one) to test your integration without affecting live data or processing real bank transactions. Your provisioned `accessId` and `accessKey` credentials determine whether requests are processed against sandbox or production environments. #### [Just getting started?](/integrate/core-concepts/integrate-client-sdk) Learn how to set up your first Trustly integration and process a test transaction. #### [Client-side SDK](/sdks) Integrate the Select Bank Widget or Trustly Lightbox using our native SDKs, or use our mobile web integration for cross-platform frameworks like Flutter and MAUI. ## Base URL All API requests should be made to the following base URLs: ``` Sandbox: https://sandbox.trustly.one/api/v1 Production: https://api.trustly.one/api/v1 ``` ## Authentication The Trustly API uses [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme) over HTTPS. Authenticate requests using your provisioned `accessId` (username) and `accessKey` (password). ```shell curl --user accessId:accessKey https://sandbox.trustly.one/api/v1/transactions ``` For additional security, you can encrypt individual requests and field-level data. See [Secure Requests and Signature Validation](/integrate/api-fundamentals/secure-requests-and-signature-validation) for details. > **Check** > > All API requests must be made over HTTPS. Calls made over plain HTTP will > fail. API requests without authentication will also fail. ## Core resources Browse the key resource groups available in the Trustly API: #### [Transactions](/api-reference/api/transactions/post-establish) Create, authorize, capture, cancel, and refund transactions. The core resource for all payment flows. #### [Payments](/api-reference/api/payments/get-payments) Retrieve payment details and list payments associated with your merchant account. #### [Accounts](/api-reference/api/accounts/get-accounts-verify) Tokenize and verify bank accounts for secure, reusable payment methods. #### [Customers](/api-reference/api/customers/get-customers) Manage customer records and retrieve customer data across transactions. #### [Account data](/api-reference/api/account-data/get-transaction-account-summary) Retrieve verified bank account information, user details, and balance data. #### [Event notifications](/api-reference/api/event-notifications/authorize) Receive asynchronous webhook notifications for transaction state changes and other events. ## Paging and filtering Requests that return multiple items return 25 items per page by default. Use `count` and `startIndex` parameters to paginate through results. | Parameter | Description | | ----------------------------------- | ------------------------------------------------------------------ | | `count` | Number of items to return. Default is 25, maximum is 100. | | `startIndex` | Zero-based index of the first item to return. | | `orderBy` | Order results by `createdAt` or `updatedAt`. | | `sortOrder` | Sort direction: `asc` (ascending) or `desc` (descending, default). | | `createdAt.start` / `createdAt.end` | Filter by creation time range (Unix timestamp). | | `updatedAt.start` / `updatedAt.end` | Filter by update time range (Unix timestamp). | ## Errors The Trustly API uses conventional HTTP response codes to indicate success or failure: | Code | Description | | ----- | ---------------------------------------------------------------- | | `200` | OK — request succeeded. | | `400` | Bad Request — invalid parameters or missing required fields. | | `401` | Unauthorized — invalid or missing authentication credentials. | | `403` | Forbidden — insufficient permissions for the requested resource. | | `404` | Not Found — the requested resource doesn't exist. | | `429` | Too Many Requests — rate limit exceeded. | | `500` | Server Error — something went wrong on Trustly's end. | > Complete reference for the Trustly REST API — integrate account authorizations, payments, and online banking into your applications. ## API Docs - API > Account Data [Get account activity summary](https://amer.developers.trustly.com/api-reference/api/account-data/get-transaction-account-summary.md) - API > Account Data [Get account balance](https://amer.developers.trustly.com/api-reference/api/account-data/get-transactions-account-balance.md) - API > Account Data [Get account users](https://amer.developers.trustly.com/api-reference/api/account-data/get-user.md) - API > Account Data [List all accounts](https://amer.developers.trustly.com/api-reference/api/account-data/list-selected-accounts.md) - API > Accounts [Post account feedback](https://amer.developers.trustly.com/api-reference/api/accounts/post-account-feedback.md) - API > Accounts [Tokenize an account](https://amer.developers.trustly.com/api-reference/api/accounts/post-accounts-tokenize-verify-account.md) - API > Accounts [Verify an account](https://amer.developers.trustly.com/api-reference/api/accounts/get-accounts-verify.md) - API > Countries [List countries](https://amer.developers.trustly.com/api-reference/api/countries/get-countries.md) - API > Customers [Create or Update a Customer](https://amer.developers.trustly.com/api-reference/api/customers/post-customers.md) - API > Customers [Get Customer by ID](https://amer.developers.trustly.com/api-reference/api/customers/get-customers-customer-id.md) - API > Customers [Get Customers](https://amer.developers.trustly.com/api-reference/api/customers/get-customers.md) - API > Customers [Update Customer by ID](https://amer.developers.trustly.com/api-reference/api/customers/post-customers-customer-id.md) - API > Dispute Management [Post a dispute](https://amer.developers.trustly.com/api-reference/api/dispute-management/post-dispute-recovery.md) - API > Event Notifications [Authorize](https://amer.developers.trustly.com/api-reference/api/event-notifications/authorize.md) - API > Event Notifications [Completed](https://amer.developers.trustly.com/api-reference/api/event-notifications/completed.md) - API > Event Notifications [Data Ready](https://amer.developers.trustly.com/api-reference/api/event-notifications/data-ready.md) - API > Event Notifications [Dispute](https://amer.developers.trustly.com/api-reference/api/event-notifications/dispute.md) - API > Event Notifications [Establish](https://amer.developers.trustly.com/api-reference/api/event-notifications/establish.md) - API > Event Notifications [Expired](https://amer.developers.trustly.com/api-reference/api/event-notifications/expired.md) - API > Event Notifications [Failed](https://amer.developers.trustly.com/api-reference/api/event-notifications/failed.md) - API > Event Notifications [Refresh](https://amer.developers.trustly.com/api-reference/api/event-notifications/refresh.md) - API > Event Notifications [Update](https://amer.developers.trustly.com/api-reference/api/event-notifications/update.md) - API > Event Notifications [Verify Customer](https://amer.developers.trustly.com/api-reference/api/event-notifications/verify-customer.md) - API > Identity [Get user](https://amer.developers.trustly.com/api-reference/api/identity/get-trustly-id-user-data.md) - API > Identity [Get user verification details](https://amer.developers.trustly.com/api-reference/api/identity/get-trustly-id-user-details.md) - API > Identity [Update user status](https://amer.developers.trustly.com/api-reference/api/identity/post-transaction-feedback.md) - API > Network Check API [Look up whether a user is known to Trustly](https://amer.developers.trustly.com/api-reference/api/network-check-api/get-customer-lookup.md) - API > Payment Providers [List payment providers](https://amer.developers.trustly.com/api-reference/api/payment-providers/get-payment-providers.md) - API > Payments [List payments](https://amer.developers.trustly.com/api-reference/api/payments/list-payments.md) - API > Payments [Retrieve payment](https://amer.developers.trustly.com/api-reference/api/payments/get-payments.md) - API > Transactions [Cancel transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-cancel.md) - API > Transactions [Capture transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-transaction-id-capture.md) - API > Transactions [Deposit transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-deposit.md) - API > Transactions [Establish a new transaction for authorization](https://amer.developers.trustly.com/api-reference/api/transactions/post-establish.md) - API > Transactions [Get transactions](https://amer.developers.trustly.com/api-reference/api/transactions/list-transactions.md) - API > Transactions [Preauthorize transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-transaction-id-capture-preauth.md) - API > Transactions [Reclaim transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-transaction-id-reclaim.md) - API > Transactions [Refresh a transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-refresh.md) - API > Transactions [Refund transaction](https://amer.developers.trustly.com/api-reference/api/transactions/post-transactions-refund.md) - API > Transactions [Retrieve a transaction](https://amer.developers.trustly.com/api-reference/api/transactions/get-transaction.md) - API > Verify Customer [Get customer verification data](https://amer.developers.trustly.com/api-reference/api/verify-customer/get-verify-customer.md) ## OpenAPI Specification The raw OpenAPI 3.1 specification for this API is available at: - [OpenAPI JSON](https://amer.developers.trustly.com/openapi.json) - [OpenAPI YAML](https://amer.developers.trustly.com/openapi.yaml)