Requests

Requests


Pay

The Pay action can be used to perform a payment.

Trustly can be used in the countries as specified

Base JSON request

Use the base request as instructed on this page

Pay request

Parameters

Service specific parameters

Parameter Type Required Recommended Description
CustomerFirstName string Required Customer first name.
CustomerLastName string Required Customer last name
CustomerCountryCode string Required Customer country code. Possible values: DE, DK, EE, ES, FI, NL, NO, PL, SE and GB.
Basic parameters

Example request

{
   "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"
               }
            ]
         }
      ]
   }
}

Pay response

Parameters

Service specific parameters

Parameter Type Required Recommended Description
BankStatementId string This parameter reflects what the consumer will see on the proof of payment (e.g. bank statement record and similar).
Basic parameters

Example response

{
   "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"
}

Pay push

Parameters

Service specific parameters

Parameter Type Required Recommended Description
BankStatementId string This parameter reflects what the consumer will see on the proof of payment (e.g. bank statement record and similar).
Basic parameters

Example push

{
   "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

Base JSON request

Use the base request as instructed on this page

Pay request

Parameters

Basic parameters

Example request

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

Pay response

Parameters

Basic parameters

Example response

{
   "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"
}

Pay push

Parameters

Basic parameters

Example push

{
   "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
   }
}

Was this article helpful?

What's Next