General

The Trustly service supports two actions: Pay and Refund.

Trustly is a European payment method supporting all counties as specified below under the parameter 'CustomerCountryCode'. Some of these countries are non Euro countries. Therefor - apart from EUR - the following currencies are supported: DKK, GBP, NOK, PLN, SEK (Any other currencies cannot be processed)

Pay

The Pay action can be used to perform a payment.

Trustly can be used in the countries as specified

View in playground

Request


JSON gateway request

CustomerFirstName
Required

Customer first name.

CustomerLastName
Required

Customer last name

CustomerCountryCode
Required

Customer country code. Possible values: DE, DK, EE, ES, FI, NL, NO, PL, SE and GB.

JSON

copy
{
   "AmountDebit": 10,
   "Currency": "EUR",
   "Invoice": "Testinvoice 123",
   "Services": {
      "ServiceList": [
         {
            "Name": "Trustly",
            "Action": "Pay",
            "Parameters": [
               {
                  "Name": "CustomerFirstName",
                  "Value": "John"
               },
               {
                  "Name": "CustomerLastName",
                  "Value": "Smith"
               },
               {
                  "Name": "CustomerCountryCode",
                  "Value": "DE"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

BankStatementId

This parameter reflects what the consumer will see on the proof of payment (e.g. bank statement record and similar).

JSON

copy
{
   "Key": "A5119DE5DE0144AF9EC99D886269xxxx",
   "Status": {
      "Code": {
         "Code": 791,
         "Description": "Pending processing"
      },
      "SubCode": {
         "Code": "S002",
         "Description": "An additional action is required: Redirect to Trustly."
      },
      "DateTime": "2020-01-08T15:32:40"
   },
   "RequiredAction": {
      "RedirectURL": "https://testcheckout.buckaroo.nl/html/redirect.ashx?r=797ABF3DEBB94354B8C9B32530C9xxxx",
      "RequestedInformation": null,
      "PayRemainderDetails": null,
      "Name": "Redirect",
      "TypeDeprecated": 0
   },
   "Services": [
      {
         "Name": "Trustly",
         "Action": null,
         "Parameters": [
            {
               "Name": "BankStatementId",
               "Value": "WKV 3QZIxxxx"
            }
         ]
      }
   ],
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "Invoice": "Testinvoice 123",
   "ServiceCode": "Trustly",
   "IsTest": true,
   "Currency": "EUR",
   "AmountDebit": 10,
   "TransactionType": "C054",
   "MutationType": 1,
   "RelatedTransactions": null,
   "ConsumerMessage": null,
   "Order": null,
   "IssuingCountry": null,
   "StartRecurrent": false,
   "Recurring": false,
   "CustomerName": "John Smith",
   "PayerHash": null,
   "PaymentKey": "0A71D126521C4799932E547BAD81xxxx"
}

Push


JSON push response

BankStatementId

Bank Statement ID

JSON

copy
{
   "Transaction": {
      "Key": "A5119DE5DE0144AF9EC99D886269xxx",
      "Invoice": "Testinvoice 123",
      "ServiceCode": "Trustly",
      "Status": {
         "Code": {
            "Code": 791,
            "Description": "Pending processing"
         },
         "SubCode": {
            "Code": "C000",
            "Description": "Pending processing"
         },
         "DateTime": "2020-01-08T15:32:40"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountDebit": 10,
      "TransactionType": "C054",
      "Services": [
         {
            "Name": "Trustly",
            "Action": null,
            "Parameters": [
               {
                  "Name": "BankStatementId",
                  "Value": "WKV 3QZIxx7"
               }
            ],
            "VersionAsProperty": 1
         }
      ],
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 1,
      "RelatedTransactions": null,
      "IsCancelable": false,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": "John Smith",
      "PayerHash": null,
      "PaymentKey": "0A71D126521C4799932E547BAD81xxx"
   }
}

Refund

View in playground

Request


JSON gateway request

No specific service parameters are required to perform a refund. However, it is required to include the transactionkey of the original transaction.

JSON

copy
{
   "Currency": "EUR",
   "AmountCredit": 0.01,
   "Invoice": "testinvoice 123",
   "OriginalTransactionKey": "A5119DE5DE0144AF9EC99D886269Bxxx",
   "Services": {
      "ServiceList": [
         {
            "Name": "Trustly",
            "Action": "Refund"
         }
      ]
   }
}

Response


JSON gateway response

JSON

copy
{
   "Key": "5143F81EABB543C6A5B939C746C9Fxxxx",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S990",
         "Description": "The request was successful."
      },
      "DateTime": "2020-01-08T16:05:56"
   },
   "RequiredAction": null,
   "Services": null,
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "Invoice": "Testinvoice 123",
   "ServiceCode": "Trustly",
   "IsTest": true,
   "Currency": "EUR",
   "AmountCredit": 0.01,
   "TransactionType": "C055",
   "MutationType": 1,
   "RelatedTransactions": [
      {
         "RelationType": "refund",
         "RelatedTransactionKey": "A5119DE5DE0144AF9EC99D886269xxx"
      }
   ],
   "ConsumerMessage": null,
   "Order": null,
   "IssuingCountry": null,
   "StartRecurrent": false,
   "Recurring": false,
   "CustomerName": null,
   "PayerHash": null,
   "PaymentKey": "4090E8741FE44442A09096D64E29xxxx"
}

Push


JSON push response

JSON

copy
{
   "Transaction": {
      "Key": "5143F81EABB543C6A5B939C746C9xxxx",
      "Invoice": "Testinvoice 123",
      "ServiceCode": "Trustly",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Success"
         },
         "SubCode": null,
         "DateTime": "2020-01-08T16:05:56"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountCredit": 0.01,
      "TransactionType": "C055",
      "Services": null,
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 1,
      "RelatedTransactions": [
         {
            "RelationType": "refund",
            "RelatedTransactionKey": "A5119DE5DE0144AF9EC99D8862xxxxx"
         }
      ],
      "IsCancelable": false,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": null,
      "PayerHash": null,
      "PaymentKey": null
   }
}