Trustly Payments

Trustly is a bank transfer payment. Through Trustly, payers can make fast, simple, and secure payments directly from their bank accounts with no risk of stolen details or fraud. Payers can also make e-commerce payments and authenticate the payment through their existing online bank interface.

It is recommended that you read the integration guidelines for browser payments before building the Trustly integration.


To offer the Trustly payment method through the Mastercard Payment Gateway,

  • you must be registered with your browser payments service provider
  • your merchant profile on the Mastercard Payment Gateway must be configured using the details of your account with the browser payments service provider, and
  • you must have a bank account in one of the supported currencies registered against your merchant account at your browser payments service provider.

Trustly Transactions

Trustly supports transactions originating from multiple countries with their corresponding currencies.

Country Currency
Austria (AUT) EUR
Czechia (CZE) EUR, CZK
Germany (DEU) EUR
Denmark (DNK) EUR, DK
Estonia (EST) EUR
Spain (ESP) EUR
Finland (FIN) EUR
France (FRA) EUR
Great Britain (GBR) GBP
Italy (ITA) EUR
Lithuania (LTU) EUR
Latvia (LVA) EUR
Netherlands (NLD) EUR
Norway (NOR) EUR, NOK
Poland (POL) EUR, PLN
Portugal (PRT) EUR
Sweden (SWE) EUR, SEK
Slovakia (SVK) EUR

Trustly Integration

Trustly through Hosted Checkout

Hosted Checkout integration allows you to collect payment details from your payer through an interaction that the Mastercard Payment Gateway hosts and displays.

From the API version 65 onward, Trustly is automatically available as a payment method once your payment service provider enables and configures you for this payment method.

For details, see Browser Payments via Hosted Checkout Integration.

Trustly through Direct Payment

Direct Payment integration allows you to offer the Trustly payment method on your own checkout page.

Trustly is supported from the API version 64 onward.

In addition to the standard fields required in a browser payment request, provide the following fields in the Initiate Browser Payment request:

Common Fields

  • sourceOfFunds.type = Trustly
  • browserPayment.operation = PAY (Trustly does not support the Authorize operation)
  • = The ID, username, hash, or anything that is used to identify the consumer
  • = Email address of a payer
  • sourceOfFunds.provided.trustly.bankAccountHolder= Name of the bank account holder for the payer's bank account
  • sourceOfFunds.provided.trustly.bankAccountCountryCode= The country where payers have their bank account. Provide the ISO 3166 alpha-3 country code for this country.

Preferred Language

You can set the language that you prefer Trustly to use for the pages that are displayed to the payer by providing the browserPayment.preferredLanguage field in the Initiate Browser Payment request. However, the language will be used only if Trustly supports it.

Sample Code to initiate Trustly Payment
    "apiOperation": "INITIATE_BROWSER_PAYMENT",
    "billing": {
        "address": {
            "country": "POL"
    "browserPayment": {
        "operation": "PAY",
        "returnUrl": "<your_merchant_URL>"
    "customer": {
        "email": "",
        "account": {
            "id": "Customer"
    "order": {
        "amount": 100,
        "currency": "PLN"
    "sourceOfFunds": {
        "type": "TRUSTLY",
        "provided": {
            "trustly": {
                "bankAccountHolder": "Test Tester",
                "bankAccountCountryCode": "POL"

How to Interpret the Transaction Result

The table specifies the transaction response codes for the possible scenarios that you may encounter after initiating the Trustly payment.

Initiate Browser Payment Response What This Means...
Redirect the payer using the URL provided in the response.
Retrieve Transaction/Retrieve Order Response What This Means...
The payment is successful.
The Mastercard Payment Gateway is waiting for a notification from the acquirer about the payment result. Try RETRIEVE_TRANSACTION again later or listen to notifications from the Mastercard Payment Gateway.
The payer has canceled the interaction for this payment. Offer the payer the option to try another payment method.
The payment was declined. Offer the payer the option to try another payment method. In case of an ACQUIRER_SYSTEM_ERROR, you may want to inquire with the acquirer about the reason for the payment failure, or you can try RETRIEVE_TRANSACTION again.
Treat this as a declined payment. The Mastercard Payment Gateway will make an attempt to ensure the transaction is not successful or will revert the transaction.


You can refund the Trustly payments in installments or in full. Ensure that you are configured for refunds on the Mastercard Payment Gateway and on your merchant account at your browser payments service provider.

Testing Your Integration

The Mastercard Payment Gateway provides a browser payments emulator that allows you to test your Trustly integration.

Copyright © 2022 Mastercard